Does the Bible actually mention Mary riding a donkey from Nazareth to Bethlehem?

No, the Bible does not say this. However, as early as the second century, the Infancy Gospel of James, soon dismissed by the Church as unhistorical, speculated that the young couple did have a donkey.

Based on exegesis of Luke's Gospel, we can arrive at an informed view that they could not have had a donkey, in spite of Mary's pregnancy. Luke 2:24 says that they offered two doves as a sacrifice at the Jerusalem temple, instead of the usual sheep. This was a concession available to the very poorest in society, evidence that Joseph could not afford to own or hire a donkey and in keeping with his status as a village carpenter. Apart from this, anyone willing to lend a donkey would have risked the loss of a valuable asset if the young family were waylaid on this long and hazardous journey or if Joseph simply failed to return.

== == The Bible gives very little detail on Mary & Joseph's actual trip to Bethlehem. Considering the times and the location, though, it was very likely that they would've had a donkey carrying their belongings on the trip, and Mary, who was well along in her pregnancy, would've ridden it rather than walked the entire way. In the "Infancy Gospel of James" (Protoevangellium of James), Chapter 17, are the verses, "And there was an order from the Emperor Augustus, that all in Bethlehem of Judaea should be enrolled. And Joseph said: I shall enrol my sons[....]. And he saddled the ass, and set her upon it; and his son led it, and Joseph followed." Although not in the Canon, the "Infancy Gospel of James", possibly written as early as the second century, tends to cross over between apocryphal and Canon. Many of the images it describes have been used by artists and writers through the centuries.