From Sahih Muslim (Hadith 3212):
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)
Reference: Muslim 3212