The Vinaya Rule specifies that if a bhikkhu touches or is touched by a woman, it is an offence only if he is overcome by lust, with altered mind.
However, the practicing bhikkhu knows that as his mind changes so quickly, he has to be extremely cautious about involving himself in doubtful situations.
It is better to be safe than sorry, even if this may seem over-scrupulous.
In emergency situations the bhikkhu will have to decide for himself and be sure to take care of his thoughts.
Learn more about the Theravadin Buddhist Monk’s Rules here:
The Bhikkhus’ Rules – Guide for Laypeople