There is no issue with this.
There is no issue with this if the bag is carried with them. Furthermore, if the body is contaminated they should wash it if it is not too difficult for them, and if it is too difficult for them to wash their body, they can perform their prayer in whatever state they are in.
If it is not too difficult for them, they need to perform their prayers in standing position, even though they do it by using a cane and the like. However, if it causes them much difficulty and discomfort, they can perform their prayers in a sitting position.
This act is makrÙh (abominable) unless this is the only way of having presence of the heart (full concentration).