Do all airports have 121.5 ?
I have worked for several ANSPs in several countries - every one of the towers/radar rooms had 121.5 monitored 24/7.
With a little co-ordination, Bahrein could have changed all traffic to a secondary freq, allowing Dubai to use the Bahrein freq as a discrete.
As Ferris has already said, more than a little coordination was done that day.
As for allowing another station to use the frequency, that depends entirely on whether the equipment at said station allows a freq. to be manually selected or not. Some main sets are selectable, some aren't. Many standby sets are, some aren't.