What is interesting is that the Rambam [פ"ד מהל' תפלה] strongly implies that the prohibition applies to davening alone but not to other things such as learning. It is also implicit from other rishonim that they agree with the Rambam.
Of course halacha li'maase we follow the Rema. In general one should know that it is forbidden to hold it in, called בל תשקצו.
[עי' תשובה בנד"ד בשו"ת דברות יעקב ח"ב סי' ג - אם ידוע למישהו עוד ספרים שהתייחסו למחלוקת זו אשמח לדעת]
What is interesting hashkafically is that the Torah is concerned not only with our being spiritually clean but with our being physically clean as well. We see this in many halachos: The gemara says to wash every day [shabbos 50b]. One must wash inside and out before davening [brachos 15a]. The sugya about how critical it is to have water for laundry [nedarim 80b]. And many many more.