Are there established protocols in Star Trek to contain a warp core breach?
For safety reasons, two section isolation doors are available to protect the Main Engineering control center from the matter/anti-matter reaction core chamber in case of a serious malfunction or plasma breach. These isolation doors can be triggered automatically. Further protection is provided by a system of containment forcefields which can be triggered in the event of a warp core breach or similar contingency.
In some cases of warp engine ruptures drive plasma could be vented and dumped into space to avert a breach, but, since most safety protocols and systems must have failed in order to get to a breach, warp core ejection was a common solution, although this was considered a last ditch effort.
I'm not sure what their source is, or whether it is canon, but the Starship Operations site has a detailed page about warp core ejection:
Starfleet protocols required that the warp core be retained if at all possible, and so power and fuel supplies are automatically sealed off at points upstream from the damaged areas. A multilayered forcefield is then deployed in an effort to contain the unstable core. If these measures fail, the safety of the crew and ship becomes paramount, and the warp core must be ejected. The procedure for warp core ejection involves initiating a manual sequence or automatic computer activation.
Once the core has been ejected, it will not necessarily breach; it may cool down in space, in which case it can be retrieved. As the core will probably still be unstable, the crew have to perform repairs before locking on a tractor beam and reconnecting the core to the engineering systems.
For vessels that were capable of separation (e.g. the Enterprise-D and other Galaxy Class vessels), evacuating the crew to the primary hull and initiating separation was also used. Vessels that did not have this capability had to resort to evacuation via transporters, escape pods and shuttles. In both cases, the aim was to get as much distance between the core and the crew as possible before detonation.
Memory Alpha also has more details about breaches.