I'm sure there are many ways of doing this, but my plan would be 2 triggers.
One trigger detects when any unit is leaving its area and runs a script which pops up a message warning the player about it.......this script would also get the present player position.
Second trigger, a little larger in size than the first, would detect the player leaving its area and just setpos him back to the previously noted position from the first trigger.
I'm sure the player would get the message eventually.
Planck