Reference: I’laam al-Musaafireen – Page 14
Question: The toilets on the plane are cramped, and sometimes the floor and the walls are dirty from what appears to look like impurities; so in this situation, when I enter to do wudhoo, I am overcome by doubt at the thought that my clothing has become soiled by touching [the toilet walls or floor]. Despite that, I [still] pray, and when I reach my destination, I change clothes and repeat my prayer – [even] after its time has passed; so what is the ruling regarding that?
Response: Firstly, it is imperative that you ascertain whether the walls of the toilet are [indeed] impure.
Secondly, once you have ascertained that, then [know] that clothing does not become impure by the mere touch [of something impure], unless the clothing or the walls are wet or moist – [something] by which the impurity can pass on to the clothing.
Thirdly, and once you have ascertained that, then in this case it is imperative that you remove the actual impurity from our clothing by washing just that area, and if you are unable to find a clean item of clothing, then you must pray in the impure garment – and as such you are not [thereafter] required to repeat the prayer; this is based upon the statement of Allaah Ta’aala: