From Sahih Bukhari (Hadith 152):
Narrated Anas bin Malik:Whenever Allah's Messenger (ﷺ) went to answer the call of nature, I along with another boy used to carry a tumbler full of water (for cleaning the private parts) and a short spear (or stick)
Reference: Bukhari 152