The Gemara (Berachot 26a) states that a Bet Kise, or a room in which people go to relieve themselves and which contains human waste, is considered to contain Rua’h Ra’a. The Gemara also gives the case of a Persian Bet Kise, which is designed such that the waste travels down a slanted pipe and is evacuated elsewhere and therefore does not contain Ruah Ra’a. As such, theHazon Ish (Orah Haim, § 17) and other rabbis are in doubt as to the status of modern-day restrooms. On one hand, similar to a Persian Bet Kise, the waste is flushed and is evacuated from the restroom and perhaps there is no issue of Ruah Ra’a. On the other hand, while one is relieving oneself, there is a time period during which the waste remains in the bowl and thus may incur a Ruah Ra’a.
Rabbi Moshe Feinstein (Igrot Moshe, vol. I, Even Ha’ezer, § 114) and Rabbi Ovadia Yosef (Yabia Omer, vol. IX, § 108:13) take the stance that modern-day bathrooms do contain Rua’h Ra’a, and thus the practical ramification would be that one would need to wash and dry one’s hands outside of the bathroom even if one did not relieve oneself. Nevertheless, Rabbi Ben Zion Abba Shaul (Or LeZion, vol. I, § 1) has a novel approach and says that only that area above the toilet contains Ruah Ra’a but not the remainder of the restroom, and one would only be required to wash his hands outside if one’s hands were above the toilet. Otherwise, according to this opinion, one would be able to wash and dry one’s hands inside the restroom. If one wishes to be strict, but cannot wash one’s hands outside, one may wash them inside the restroom, but dry them outside.
Regarding lavatories on airplanes and the like, most Poskim agree that because they are considered temporary restrooms, they do not contain Ruah Ra’a and as such one is not required to wash one’s hands outside according to the letter of the law.
In a previous Halacha, it was mentioned that using a bathhouse requires washing one’s hands afterwards. However, Rabbi Elazar Schach (Avi Ha’ezri, Michtavim Vema’amarim, vol. VI, letter 652) says that a room which contains a bathtub or shower as well as counter space and the like (but no toilet), does not have Ruah Ra’a. This is because the room is not solely designated for bathing, as is a real bathhouse, but rather for grooming oneself, or for a woman to put on makeup etc. Furthermore, such rooms nowadays are usually kept very clean and would not seem to contain Ruah Ra’a.
Summary: There is a Halachic basis to be lenient and to permit washing and drying one’s hands in a restroom after one relieves oneself. Similarly, one is not be required to wash one’s hands outside of a shower room that is also used to prepare oneself, or after using an airplane or train lavatory.