Sahih al-Bukhari 239
Sahih al-Bukhari · Book 4: Ablutions (Wudu') · Urinating in stagnant water
The same narrator said that the Prophet (ﷺ) had said:
وَبِإِسْنَادِهِ قَالَ " لاَ يَبُولَنَّ أَحَدُكُمْ فِي الْمَاءِ الدَّائِمِ الَّذِي لاَ يَجْرِي، ثُمَّ يَغْتَسِلُ فِيهِ " .
"You should not pass urine in stagnant water which is not flowing then (you may need to) wash in it."