Discussion on these narrations can be approached from several angles: The first is that none of them explicitly state which prayer is being performed in such a state. And since this is not specified, we interpret them as referring to the funeral prayer (salat al-janazah), because it is among those prayers that a person is allowed to perform even if his garment is not pure, just as he may perform it even if he himself is not in a state of ritual purity. The second is that it may be permissible to pray in such a condition, but once water is available, the garment must be washed and the prayer repeated. What supports this interpretation is what was narrated:
Commentary #28