The Messenger of Allah ﷺ came out from the lavatory, and food was brought to him. They asked, "Shall we bring you water for ablution?"He replied, "I have only been commanded to perform ablution when I rise for prayer."
حدثنا أحمد بن منيع حدثنا إسمعيل بن إبراهيم عن أيوب عن ابن أبي مليكة
أن رسول الله ﷺ خرج من الخلاء فقرب إليه طعام فقالوا ألا نأتيك بوضوء قال إنما أمرت بالوضوء إذا قمت إلى الصلاة
Isnad grading, its isnad is sahih.It was also related by Abu Dawud in the chapter on Foods, section on washing the hands before eating, no. 3760, and by Nasai, no. 132, through the hadith of Ismail bin Ulaya, by the same route. Ibn Khuzayma graded it sahih, no. 35, and Baghawi graded it hasan, no. 2835. It also has another route recorded by Muslim and others.The hadith of Amr bin Dinar was related by Muslim, no. 374.