Sahih Muslim , Book 7, Hadith 3050 (USC-MSA) ⓘ
Anas reported: Someone happened to pass by Allah's Apostle with a sacrificial camel, or a sacrificial animal, whereupon he said: Ride on it. He said: It is a sacrificial camel, or animal, whereupon he said: (Ride) even if (it is a sacrificial camel).
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنْ مِسْعَرٍ، عَنْ بُكَيْرِ بْنِ الأَخْنَسِ، عَنْ أَنَسٍ، قَالَ سَمِعْتُهُ يَقُولُ مُرَّ عَلَى النَّبِيِّ صلى الله عليه وسلم بِبَدَنَةٍ أَوْ هَدِيَّةٍ فَقَالَ " ارْكَبْهَا " . قَالَ إِنَّهَا بَدَنَةٌ أَوْ هَدِيَّةٌ . فَقَالَ " وَإِنْ " .
also referenced under: Book 15, Hadith 416 (In-Book) & Hadith 1323 (Reference)