Can A Monk Leave The Monastery

Can A Monk Leave The Monastery - Another case would be monks that were elected as bishops.