Check the book again; if that is really what it says, then it is wrong.
I'm looking right at it; it has pictures and stuff, and it's pretty clear.
Maybe we're miscommunicating or something. It seems to me that the Rat is saying that the bacterial flagellum free rotates within its socket, like the shaft of a motor, around the long axis of the flagellum.
The textbook says that it beats back and forth, or whips around in a circular motion, but doesn't actually
spin. The flagellum whips around like if you were to grab a garden hose in one hand and move your hand up and down and left and right, in a circle - the hose whips around, kind of in a helix, but doesn't actually
spin freely of your hand.
Like I said, the textbook is pretty clear about that. I don't think I'm misunderstanding it. From what I'm reading, bacterial flagella don't rotate in a socket like the shaft of a motor, they whip around like whips.