Ok. I am looking at the 2013 Friend at Court which was just released. A new, clarified rule is:
A player may leave the court to retrieve a ball. A player shall obtain permission from an official to leave the court. If a player is unable to contact an official, a player may leave the court:
To contact an official
For a toilet/change Of attire break
To obtain water on a changeover or set break when none is available on the court
To repair or replace broken clothing, shoes, or necessary equipment other than the racket.
This was put in because there are some officials and players that are just too officious and don't have much common sense, so they just say " you can't leave" when good judgement should prevail as there are sometimes it makes sense for a player to temporarily leave.
These are all subject to "reasonable time" limitations, which of course is very subjective. If the closest water is a few minutes walk, that could be considered reasonable.