Delaying a Trip to the Bathroom
Halachah states that we may not delay using the facilities. This halachah is hinted to in the lav (Torah prohibition) of bal t’shaktzu (do not act repulsively)—the original lav refers to ingesting insects, while the prohibition of refraining from going to the bathroom when needed is only an issur d’Rabbanan (Rabbinic prohibition), according to most opinions.
Bal t’shaktzu only applies in a case where a person has an urge to go and cannot distract themselves from the need to go, and all that is preventing leakage is good muscle control. According to many poskim, if a person can put off the urge to use the bathroom for a period of 72 minutes, it is not considered a violation of bal t’shaktzu. Some poskim maintain that the issur of bal t’shaktzu does not apply to postponing urination, and refers only to postponing bowel movements, but there is the added warning of Chazal that such effort can pose a danger and affect fertility, chas v’sholom.
Chazal did not consider it bal teshaktzu if the delay was due to seeking out a proper facility, if in the midst of delivering a speech in public, or if being called up to the Torah reading. Kavod habriyos (human dignity) trumps going promptly in the above cases. In addition, it does not pertain to having the urge to go during davening, so that one should not interrupt davening unnecessarily, as long as proper planning was executed prior to beginning davening (see Halachah #682 for more on the subject). Under any circumstance where it would not be considered proper etiquette to leave for a bathroom break (such as in middle of a conversation or rushing out of bed), a person may delay going. However, “being too busy” completing a task for a length of time and postponing a bathroom trip is not permitted.
These rules do not address stress and compulsive disorders that play with a person’s mind to project a necessity; in such cases professional guidance must be sought.* Regarding the concern about possibly having to urinate at random times, halachah provides guidelines for the average person (with good bladder control): there is no need to worry for up to three hours after urinating. As mentioned earlier, if the urge to go disappears when distracted, this is an indication that the “mind is playing tricks” and this isn't considered a need to use the facilities
* For OCD in halachah, see Halachah #355.