It is permissible to ride the sacrificial animal if necessary Sahih Muslim 1323 b

Arabic hadith text
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنْ مِسْعَرٍ، عَنْ بُكَيْرِ بْنِ الأَخْنَسِ، عَنْ أَنَسٍ، قَالَ سَمِعْتُهُ يَقُولُمُرَّ عَلَى النَّبِيِّ صلى الله عليه وسلم بِبَدَنَةٍ أَوْ هَدِيَّةٍ فَقَالَ ‏"‏ ارْكَبْهَا ‏"‏ ‏.‏ قَالَ إِنَّهَا بَدَنَةٌ أَوْ هَدِيَّةٌ ‏.‏ فَقَالَ ‏"‏ وَإِنْ ‏"‏ ‏.‏
Translation
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).