Secondary schools in areas with significant rises in Covid-19 cases could be put on a rota system limiting the number of pupils attending.
New guidance for England said the measure is intended to reduce the number of people students are in contact with and limit transmission.
The education secretary said the changes are an "absolute last resort".
The guidance, published on Friday night, comes just days before millions of pupils go back to school.
Education Secretary Gavin Williamson said the measures were contingency plans for a "worst-case scenario".
"We hope that we won't have to implement the guidance set out today," said Mr Williamson.
"Changes to school attendance will only be an absolute last resort."
Paul Whiteman, leader of the National Association of Head Teachers, said: "Keeping schools open has to be the priority, but you don't need a crystal ball to see that there will almost inevitably be some disruption in some areas in the coming weeks."
He said that heads had been asking for weeks for this "Plan B" for what happens in the event of an outbreak - and "another late-night publication is fairly typical of what we've become used to".
Meanwhile, Health Secretary Matt Hancock has not ruled out nationwide restrictions should England see a spike in coronavirus cases this winter.
Mr Hancock told The Times that a second wave was "a very serious threat" and that, under a "reasonable worst-case scenario", Britain could be faced with a spike in Covid-19 cases and a bad outbreak of seasonal flu as people spend more time indoors.
Image copyright PA MediaFor schools to respond to changing levels of coronavirus cases, there will be a four-stage set of responses - which will all prioritise keeping primary school pupils in school full-time.
The default setting will be Tier 1, where all pupils will attend full-time.
If local public health and education officials decide levels of infection are too high, schools could move to a Tier 2 response, in which secondary pupils would go on to a part-time rota. They would be in school for two weeks and then study online at home for two weeks.
The guidance says schools would only be affected in this way after "all other measures have been exhausted" - but it says this would help to break the chain of Covid-19 transmission.
A more severe response would be Tier 3, in which most secondary pupils would study from home, and then Tier 4, in which all types of school would switch to studying from home, except for the children of key workers and vulnerable children.
If anyone in school tests positive, the guidance says health protection teams will carry out a rapid risk assessment to confirm who has been in close contact with the person and ask them to self-isolate for 14 days.
Two or more cases in two weeks is deemed an outbreak, which could result in further action, such as a mobile testing unit being dispatched to the school.
In some cases, health protection teams may recommend that a year group or even the whole school is asked to self-isolate at home.
Geoff Barton, leader of the ASCL head teachers' union welcomed the contingency planning but criticised its last-minute publication.
"To wait until the Friday night before most schools return isn't the government's finest moment. Obviously, schools haven't had any chance whatsoever to incorporate this into their planning and will now have to revisit the plans they have put in place," he said.
"In any event, it is a step in the right direction. Obviously, everybody will be hoping that these back-up plans aren't needed and that schools are able to remain fully open."
The Department for Education also amended its announcement of the guidance shortly after publication, removing a passage which said that if a case in school or college is confirmed an entire year group or "bubble" might be asked to isolate for 14 days.
Image caption Schools are preparing to welcome all pupils for the first time since MarchIt said this was "out of date with the latest guidance at the time of publication".
Education staff and parents took to Twitter to express irritation at the timing of the publication.
"The timing of this shows total disregard for schools, leaders and teachers. It is utterly breathtaking that this is how we are repeatedly treated," said deputy head Daniel Sabato.
Claire Sheehan said: "Our school waited until late this week to send guidance in case stuff changed."
It felt like the government was "full of the same people [who] wd send redundancy emails 530 fri", she said.
Several teachers raised concerns about the guidance on whole year groups isolating, which was later removed.
Head of geography Mark Enser asked: "Staff in most secondaries are teaching across year group bubbles - who would be in school to teach the rest?"
"I'm a dinner lady, and the lunch hall is a communal area that face masks can't be worn in," said Trudi Gard.
"The dinner ladies come into contact with all children from all bubbles. If a child infects us, we infect everyone else."