Britain’s convoluted negotiations over leaving Europe have left many in a state of confusion. But now things are becoming clearer. There is a deal with the EU, agreed by the cabinet despite howls from the Tory backbenches, while attempts to bring about a no-confidence vote in the prime minister appear to have fizzled out.

But this still leaves many things unresolved.

If Britain and the European Union sign the “deal” – that is, the withdrawal agreement and the declaration on the future relationship – it must then be ratified by the European parliament and by Westminster.

MPs have been guaranteed a “meaningful vote”. They must approve the deal on a motion and then legislate to ratify the withdrawal agreement. The Lords only have to “take note” of the deal and ratify the agreement.

The Commons vote, however, will not be as “meaningful” as it appears. In practice, MPs have only two choices: to ratify or refuse to ratify. Substantive amendments would not alter the agreement, and would be equivalent to rejection.

Some MPs appear to believe that, if amendments are passed, the prime minister could return to Brussels to seek a better deal. That is implausible. The EU regards the deal as a package that cannot be untied. If Britain seeks to amend provisions that it dislikes, the EU could seek to untie the package in its own favour by amending provisions that it dislikes – Gibraltar and fishing rights being two discussed this week.

Hence, if any amendments were to be carried against the government, the prime minister would have lost her authority. She could hardly return to Brussels to say: “Parliament will not back me – will you please give me something better?” The EU would reply: “We only deal with those enjoying democratic legitimacy.” The truth is, if the bill is not passed in an unamended form, the government will not be able to ratify the agreement.

In 1993, when John Major was defeated on a provision ratifying the Maastricht treaty, he returned to the Commons the next day, declaring it a matter of confidence and threatening to dissolve parliament. The rebels, fearful of an election, duly came to heel.

That procedure, however, is not open to May. Under the Fixed Term Parliaments Act, passed in 2011, a substantive motion cannot have a confidence vote attached to it. Parliament can only be dissolved if a specific vote of no confidence is carried against the government, and if no alternative government can be formed within 14 days. It would be a bold Conservative or Democratic Unionist MP who would be prepared to oppose the government in a confidence vote.

Alternatively, an early election could occur if two-thirds of MPs voted for it. Given what happened last year, it is highly unlikely, however, that many Conservatives would be prepared to take this risk. Turkeys do not normally vote for Christmas.

If defeated on the approval vote or the legislation, May, therefore, would have little option but to resign. There would then be an election for a new Conservative leader. No one other than a Conservative would be able to command a majority in the Commons.

If, as is likely, there is more than one candidate, the leadership will be settled by party members who would have to decide between the two candidates most favoured by MPs. The election would take at least a month, and probably longer. It might not be completed until just before the Brexit date of 29 March.

Meanwhile, either May would continue as a caretaker prime minister; or there would be an alternative caretaker – possibly her deputy, David Lidington, unless he were himself a candidate. Such an arrangement would be perilous for a country approaching Brexit when so many difficult decisions need to be made; and the new prime minister would face exactly the same dilemmas as May – Brexiteer and remainer MPs opposed to the deal for incompatible reasons.

Many Labour MPs, together with the SNP, the Liberal Democrats and a few Conservatives, favour a people’s vote. MPs might indeed pass an amendment that the deal only comes into effect following a referendum. But that would not be sufficient to provide for one. Since Britain lacks a generic referendum act, specific legislative provision would have to be made.

The legislation providing for the 2016 referendum was introduced in May 2015 and enacted in December. No doubt the procedure could be speeded up; but even so, the Electoral Commission believes there should be six months from introduction of the bill to the referendum, including a 10-week campaign period. There would therefore have to be an extension of the Brexit deadline beyond 29 March.

There would be difficult issues for the Electoral Commission to resolve – in particular whether there should be just two alternatives or three. A simple referendum posing remain versus the deal would not satisfy many Brexiteers, who might favour a no-deal outcome. Therefore, there would have to be three options. MP Justine Greening has argued for a single referendum with a transferable vote. I would favour two referendums held a couple of weeks apart, the first asking voters whether they wished to leave or remain. If leave won, the second referendum would seek a verdict on the terms of departure. No doubt the Brexiteers would still say the cards were stacked against them since a single remain option was being opposed by two leave options.

The other alternative to a deal is a no-deal Brexit. That, perhaps, need not be as terrible as some suggest. Bilateral agreements on specific sectors such as aviation could ensure that chaos is avoided. But there would be a host of customs, VAT checks and regulatory checks at Britain’s borders, involving hours of extra paperwork and delays, not to mention the issue of the Irish border. The queues at the Turkish border with Bulgaria, where a two-hour wait counts as a good day, would be replicated at Dover. That means higher costs and lower revenues. Business is almost unanimous in opposing a no-deal Brexit.

MPs are taking out their frustrations on Brexit by giving May a battering. But perhaps she can console herself by remembering the wise words of Iain Macleod, colonial secretary in the early 1960s. “The Conservative party,” he said, “is a generous party. It always forgives those who are wrong. Sometimes it even forgives those who are right.”

• Vernon Bogdanor is professor of government at King’s College, London. His book, Beyond Brexit, will be published by I.B.Tauris in January