Bismillahi Al-Rahmani Al-Rahim
Lacking Both Water And Dirt
If someone does not have water OR dirt, what does someone do?
al-salamu `alaykum wa rahmatullahi wa barakatuhu
When someone simply has no way of achieving ritual purity, he goes ahead and prays, performing only the obligatory actions. This prayer would not need to be repeated since the person has done as much as they possibly could in the time that they were required to do so. There may be other factors that required the prayer to be repeated, such as praying while wearing clothes with unpardonable filth.
And Allah knows best.
wa al-salamu `alaykum