It was narrated from Abu Sa'eed Al-Khudri that: The Prophet (ﷺ) was asked about the water basins located between Makkah and Al-Madinah, which were visited by wild animals, dogs and donkeys, and about using them for means of purification. He said: "Whatever they (the animals) have carried in their bellies is for them, and whatever is left over is for us, and is pure."
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا أَبُو مُصْعَبٍ الْمَدَنِيُّ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ زَيْدِ بْنِ أَسْلَمَ، عَنْ أَبِيهِ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ سُئِلَ عَنِ الْحِيَاضِ الَّتِي بَيْنَ مَكَّةَ وَالْمَدِينَةِ تَرِدُهَا السِّبَاعُ وَالْكِلاَبُ وَالْحُمُرُ وَعَنِ الطَّهَارَةِ مِنْهَا فَقَالَ " لَهَا مَا حَمَلَتْ فِي بُطُونِهَا وَلَنَا مَا غَبَرَ طَهُورٌ " .
sunnah.com