Both of your books are correct, but they are talking about different types of rhythm --or more properly, rhythm at different scales.
At the level of individual words, rhythm is created by the pattern of stressed and unstressed syllables. For instance:
Whose woods these are, I think I know
His house is in the village, though
- Robert Frost
This is regular iambic quadrimeter. The rhythm is "da-DA da-DA da-DA da-DA" in each line.
Similarly, this is regular trochaic quadrimeter: "DA-da DA-da DA-da DA-da".
By the shores of Gitchee Gumee
By the shining Big-Sea waters
There are also much more complex rhythmic schemes, including ones in sprung rhythm, which doesn't always match natural speech.
When I was YOUNG me and my mama had BEEF
seventeen years OLD kicked out on the STREET
Here, above, there are two strong beats in each line, and the rest of the words fit in around that beat.
However, there is also rhythm at a larger scale, in terms of phrases, sentences, and even whole paragraphs. Shorter phrases and/or sentences give a faster, more urgent rhythm, longer ones give a slower, more contemplative effect.
We shall go on to the end, we shall fight in France, we shall fight on the seas and oceans, we shall fight with growing confidence and growing strength in the air, we shall defend our Island, whatever the cost may be, we shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Rhythm in prose is typically found only at this second level --when the syllabic rhythm is too regular, it gives a "sing-songy" effect that most people don't like in prose.