عن ابي أمامة أن رسول الله ﷺ نهى أن يصلى الرجل وهو حاقن
سنن إبن ماجه كتاب الطهارة وسننها
Abu Umama related that the Messenger of Allah (SAW) forbade anyone to pray if he was holding back the urge.
Sunan Ibn Majah, The book of purity and its sunnah