From Sahih Bukhari (Hadith 150):
Narrated Anas bin Malik:Whenever Allah's Messenger (ﷺ) went to answer the call of nature, I along with another boy used to accompany him with a tumbler full of water. (Hisham commented, "So that he might wash his private parts with it)
Reference: Bukhari 150