Anas reported that whenever the Prophet ﷺ went out to relieve himself, I and another young boy would follow him, carrying a staff, a stick, or a short spear, along with a small water vessel. When he finished, we would hand him the water vessel.
كان النبي ﷺ إذا خرج لحاجته تبعته أنا وغلام، ومعنا عكازة أو عصا، أو عنزة، ومعنا إداوة، فإذا فرغ من حاجته ناولناه الإداوة.
Bukhari related it in the Book of Prayer (500) and Muslim in the Book of Purification (271), both from the hadith of Shuba, from Ata bin Abu Maymuna, who heard Anas bin Malik say (as mentioned above). The wording given is that of Bukhari, and the wording of Muslim is similar.