كتاب الحج
15  
The Book of Pilgrimage
(65)
Chapter: It is permissible to ride the sacrificial animal if necessary
(65)
باب جَوَازِ رُكُوبِ الْبَدَنَةِ الْمُهْدَاةِ لِمَنِ احْتَاجَ إِلَيْهَا ‏‏
Sahih Muslim 1322 a

Abu Huraira (Allah be pleased with him) rerorted that Allah's Messenger (ﷺ) saw a person who was driving a sacrificial camel (and told him to ride on it. Thereupon he said:

Messenger of Allah, it is a sacrificial camel. He told him again to ride on it; (when he received the same reply) he said: Woe to you, (he uttered these words on the second or the third reply).
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى رَجُلاً يَسُوقُ بَدَنَةً فَقَالَ ‏"‏ ارْكَبْهَا ‏"‏ ‏.‏ قَالَ يَا رَسُولَ اللَّهِ إِنَّهَا بَدَنَةٌ ‏.‏ فَقَالَ ‏"‏ ارْكَبْهَا وَيْلَكَ ‏"‏ ‏.‏ فِي الثَّانِيَةِ أَوْ فِي الثَّالِثَةِ ‏.‏
Reference : Sahih Muslim 1322a
In-book reference : Book 15, Hadith 412
USC-MSA web (English) reference : Book 7, Hadith 3046
  (deprecated numbering scheme)