The speaker of the Commons, John Bercow, announced that the Thursday vote will set next Wednesday as a deadline for MPs to agree a Brexit deal.
If a Brexit deal is passed by then, the British government will seek an extension of Britain's departure date from the EU until June 30.
But if the deal is not passed by Wednesday the government will need a longer extension, requiring Britain to take part in European elections.
In what political commentators said was a night of chaos, MPs had earlier backed a measure aimed at stopping a no-deal option in any circumstances.
The success of that measure, won by 312 votes to 308, meant that the text of the main and final vote had to be changed to rule out an option of Britain leaving the EU without a deal.
Even with the latest defeat for May, the no-deal option will need a change in legislation to become enforceable.
After the result was announced, May said that the Wednesday vote does not change the fundamental problem that if MPs want to rule out a no-deal Brexit they must vote for a deal.
In Brussels, EU leaders demanded a "clear answer" about what Britain wants, and were preparing to take a hard line if, as widely expected, the British prime minister asks for a postponement of Brexit.
The EU's chief Brexit negotiator Michel Barnier insisted there would be no further offer from Brussels apart from the deal already on the table.
Earlier Wednesday, British Chancellor Philip Hammond signaled his backing for a cross-party consensus over Brexit, despite the PM still appearing to support her own deal.
He told MPs they had "a solemn duty in the days ahead to put aside our differences and seek a compromise."