Praise be to Allaah.
If a person is suffering from urinary incontinence, one of the following two scenarios must apply:
1 – It is continuous and does not stop for long enough for him to do wudoo’ and pray. In this case he must clean himself and use something to stop the urine spreading. He should do wudoo’ after the time for the prayer begins, then pray with the congregation like all other people. But if he is afraid that he may contaminate the mosque, it is not permissible for him to enter, and he should pray at home, in congregation if possible, or on his own.
Ibn Qudaamah said in al-Mughni (1/201):
As for the woman who is suffering from istihaadah (non-menstrual vaginal bleeding), her case is like that of one who is suffering from urinary incontinence. They may stay in the mosque and pass through it if there is no risk of contamination of the mosque, because it was narrated from ‘Aa’ishah that one of the wives of the Messenger of Allaah (peace and blessings of Allaah be upon him) observed i'tikaaf with him when she was suffering from istihaadah. She used to see red and yellow discharge, and sometimes she would place a bowl beneath her when she prayed. Narrated by al-Bukhaari… If there is the fear of contaminating the mosque, then he should not pass through the mosque, because the mosque should be protected from that, as it should be protected from people urinating in it. If the menstruating woman fears that the mosque may be contaminated as the result of her passing through it, then she should not do that. End quote.
Al-Nawawi said in al-Majmoo’, 2/177:
It is haraam to bring any impurity into the mosque. As for a person who has any impurity in his body or is wounded, if he fears that the mosque may be contaminated it is haraam for him to enter, but if there is no such risk it is not haraam. The evidence for that is the hadeeth of Anas (may Allaah be pleased with him), according to which the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “These mosques are not for urine and filth, rather they are for the remembrance of Allaah (dhikr) and recitation of Qur’aan,” or as the Messenger of Allaah (peace and blessings of Allaah be upon him) said. Narrated by Muslim. End quote.
2 – If the emission stops after a while for long enough for him to do wudoo’ and pray, such as if he knows that after relieving himself the emission of urine will stop after an hour – for example. In this case he should delay praying until the time when the urine will stop, even if that leads to him missing the prayer in congregation. In that case he should pray with his family if possible, so that he may attain the virtue of praying in congregation.
The scholars of the Standing Committee were asked: There is a man who is suffering from incontinence, but he remains pure for a while after urinating. If he waits for the incontinence to stop, the prayer in congregation will be over. What is the ruling?
They replied: If he knows that the incontinence will end, it is not permissible for him to pray whilst this problem is with him, seeking the virtue of praying in congregation. Rather he has to wait until (the incontinence) ends, then he should clean himself, do wudoo’ and pray, even if he misses the prayer in congregation. But he should hasten to clean himself and do wudoo’ after the time for prayer begins, in the hope that he will be able to pray with the congregation.
Fataawa al-Lajnah al-Daa’imah, 5/408.
And Allaah knows best.