At Qadisiyyah, a funeral procession passed by the two of them and they stood up. It was said to them, "It is one of the local inhabitants." They replied, "A funeral procession once passed by the Messenger of Allah ﷺ and he stood up. It was said to him, 'It is a Jew.' He responded, 'Is it not a soul?'"
أخبرنا إسمعيل بن مسعود قال حدثنا خالد قال حدثنا شعبة عن عمرو بن مرة عن عبد الرحمن بن أبي ليلى قال كان
بالقادسية فمر عليهما بجنازة فقاما فقيل لهما إنها من أهل الأرض فقالا مر على رسول الله ﷺ بجنازة فقام فقيل له إنه يهودي فقال أليست نفسا
Bukhari narrated it in the Book of Funerals, chapter on standing for the funeral of a Jew, hadith no. 1312, and Muslim in the Book of Funerals, chapter on standing for the funeral, hadith no. 961, from the hadith of Shubah with this wording. It is also found in Kubra, hadith no. 2048.Khalid is Ibn Harith.