The Prophet ﷺ forbade praying in the middle of the road, relieving oneself there, or urinating on it.
حدثنا محمد بن يحيى حدثنا عمرو بن خالد حدثنا ابن لهيعة عن قرة عن ابن شهاب
أن النبي ﷺ نهى أن يصلى على قارعة الطريق أو يضرب الخلاء عليها أو يبال فيها
No references are available.
[Its chain is daif] Tabarani reported it in Mujam al-Kabir 12/281, no. 13120, through Amr bin Khalid Harrani, from him. Ibn Lahia practices tadlis from weak narrators (see Tabaqat al-Mudallisin, fifth category), and Busiri graded the chain daif.