Ibn Abdullah Muzani reported,

It was mentioned to Ibn Umar that Anas had told them that the Prophet ﷺ entered ihram for both an Umra and a Hajj. So Ibn Umar said, "The Prophet ﷺ entered ihram for Hajj, and we entered ihram for it along with him. When we arrived in Mecca, he said, 'Whoever has not brought a sacrificial animal with him should make it an Umra.' The Prophet ﷺ had a sacrificial animal with him.Then Ali bin Abu Talib came to us from Yemen intending to perform Hajj, and the Prophet ﷺ asked him, 'For what did you enter ihram, since your family is here with us?'Ali replied, 'I entered ihram for that for which the Prophet ﷺ entered ihram.'The Prophet ﷺ said, 'Then refrain from leaving ihram, for we have a sacrificial animal with us.'"

Azami 4917

Sahih

عن بكر (هو ابن عبد الله المزني)

أنه ذكر لابن عمر أن أنسا حدتهم أن النبي ﷺ أهل بعمرة وحجة فقال: أهل النبي ﷺ بالحج وأهللنا به معه، فلما قدمنا مكة، قال: من لم يكن معه هدي فليجعلها عمرة. وكان مع النبي ﷺ هدي، فقدم علينا علي بن أبي طالب من اليمن حاجا فقال النبي ﷺ: بم أهللت، فإن معنا أهلك؟ قال: أهللت بما أهل به النبي ﷺ قال: فأمسك فإن معنا هديا.

الأعظمي 4917صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Description of the Hajj of the Prophet ﷺ as narrated by Jabir and others, and the rulings mentioned therein
Section
Prophet ﷺ commanding in Makkah to annul Hajj for those who did not have a sacrificial animal
Numbering
Jami al-Kamil 4917 (2nd edition)
Azami 4917