Scottish farmers fear that up to a million sheep face being starved or frozen to death after being caught out on exposed hillsides.

The National Farmers' Union in Scotland said about a third of the country's sheep were on hills and warned that many flocks were "on a real knife edge". After weeks of snow and sub-zero temperatures, conditions are expected to worsen this weekend, with the cold lasting for at least another week.

The warning came as some dairy farmers had to dump milk and add it to their slurry after milk tankers were unable to reach them because local roads had become impassable.

The organic milk producers' association, Omsco, which provides 80% of the UK's organic supplies, said 100,000 litres had been dumped over the last 48 hours. While there is no risk of milk shortages in shops, dairy farmers in the Borders and north-east Scotland were also dumping milk, losing up 26p a litre.

In the worst-affected areas of northern Scotland, the snow – which has been falling for up to three weeks and is reported to be 1.2m (4ft) deep in places – has brought down the roofs of barns, cow byres and garages, killing cattle and damaging vehicles.

In one case, a farm worker in Aberdeenshire narrowly escaped being crushed after a large cattle shed at Edinglassie Mains farm in the Glass area collapsed. Several cows were killed and the worker was taken to hospital after being dug out by colleagues.

Nigel Miller, vice-president of NFU Scotland and a former vet, said that sheep farms were facing a crisis. With about 1m of Scotland's 2.8m sheep caught outside, he said, "almost a third of the flock is really in a pretty vulnerable situation".

Miller, a sheep and cattle farmer near Galashiels in the Borders, said the conditions were the worst he had seen since 1981. His flocks had been snowbound since mid-December. Many farmers were finding it impossible to reach their flocks to provide them with feed or herd them to lower ground.

The greatest fear is that winds could start blowing the deep snow into drifts, burying and smothering flocks. Many could also begin to dehydrate through a lack of drinking water.

"That's the real scare: if it really begins to blow around, these sheep will be in real trouble," he said. "The danger now is that they're trapped. If this goes on too long, they'll have nutritional problems.

"We're on a bit of knife edge and the next few weeks will determine how this goes. If this goes on much longer, they will lose energy and we've got a real disaster scenario."

Alistair Mackintosh, chairman of the NFU's national livestock board for England, said the situation for hill farmers in English counties was less critical. The worst affected areas included the Pennines, Teesside, Cumbria and Wales. "It's very challenging trying to get feed in the fields," he said. "The other big challenge is making sure the animals have water."

Richard Betton, 55, who farms pedigree swaledale sheep near Barnard Castle in Upper Teesdale, said the snow was so deep the sheep could not graze. "My biggest worry is in keeping these sheep alive for the next month."