You may understand that situation in Ireland is unique, so UK is not best example for the problems of leaving union. USSR actually had paragraphs for disintegration of the union, and they were actually used in order disintegrate.
Law on exiting Soviet Union was purposedly built on a way that made exiting union very hard requiring 2/3 majority and seperate referendums for all national autonomies and places where non-titular nationality constituted majority, like Narva in Estonia for example.
Obviously the law was ignored when USSR disintegrated but if one of the Union republics had tried to secede in accordance of the law situation somewhat comparable to problems with Northern Ireland would have likely followed.