I have seen this happen to a colleague who tried to leave for a competitor. His manager at his current job found out, contacted their counterpart at the competitor and got the job offer rescinded. Needless to say, my colleague was extremely pissed off and ended up exiting to a non-competitor as soon as possible.
Also I used to work at a consultancy. The unwritten rule was that clients would not try to hire any of the consultants directly, especially if they had been seconded in to the client for an extended period. If a consultant applied for an advertised position, it wouldn't be blocked but would be frowned on and cause tension for the client with the consultancy (usually an increase in rates).