Withdrawal from the European Union
The article 50 of the Treaty on European Union provides for a mechanism for the voluntary and unilateral withdrawal of a country from the European Union (EU), as it was established in the Lisbon Treaty:
An EU country wishing to withdraw must notify the European Council of its intention to do so. The European Council is then required to provide guidelines for the conclusion of an agreement setting out the arrangements for that country's withdrawal.
This agreement is concluded on behalf of the EU by the Council, acting by qualified majority, having obtained the European Parliament's consent.
The EU treaties cease to apply to the country in question from the date of entry into force of the agreement, or within 2 years of the notification of the withdrawal. The Council may decide to extend that period.
Any country that has withdrawn from the EU may apply to rejoin. It would be required to go through the accession procedure.
Then every state of the EU unilateral right to withdrawal if it is in accordance with its own constitutional law formalities, according have the to the sovereignty principle and the duty not to intervene in matters within the domestic jurisdiction of any state.
Once the mechanism is activated, it could be canceled but not unilaterally, it must be by consensus.