The PM's deputy official spokesman said "any destabilising action" by Russia would be a strategic mistake with significant consequences.
The warning came as the US and Russia held urgent talks in a bid to avert further conflict on Ukraine's border.
Russia denies it is planning an invasion but has moved 100,000 troops near to its border with Ukraine.
It has seized Ukrainian territory before - Crimea, in 2014 - and the head of the military alliance Nato has warned there is a real risk of a fresh conflict in Europe.
President Vladimir Putin has made a series of demands to the West, insisting Ukraine should never be allowed to join Nato and that Nato abandons military activity in eastern Europe.
Nato's 30 members - including the UK, US and several former Soviet Union states which share a border with Russia - agree that an armed attack against one is an attack against them all, and they will come to the aid of one another.
Downing Street said the UK was "working closely with our partners, including the US, to draw up a package of sweeping measures to make sure that the Russian government is punished if it crosses the line".
"The only way forward is for Russia to deescalate and engage in meaningful discussions," the spokesman said.
Russian Foreign Minister Sergei Lavrov and US Secretary of State Antony Blinken held talks in Geneva earlier, in a bid to defuse tensions.
Speaking afterwards, Mr Lavrov said the discussion - which lasted just over an hour - was open and useful, adding that he hoped emotions would cool after the "frank" talks. He added Russia had never threatened "the Ukrainian people".
Mr Blinken said the US and its allies were prepared to look at addressing Russia's security concerns, but only if Russia reciprocated.
He said Russia now faced a choice between diplomacy or conflict. The pair agreed to further discussions in the coming weeks.
Russia's president has long claimed that the US broke a guarantee it made in 1990 that Nato would not expand further east. "They simply deceived us!" he said at a news conference last month.
Interpretations differ over what exactly was promised to the then-Soviet leader, Mikhail Gorbachev. But it is clear that Mr Putin believes the guarantee was made.
Since then, several central and eastern European countries, which used to be part of the Soviet Union or its sphere of influence, have joined Nato. Four of them - Poland, Lithuania, Latvia and Estonia - have borders with Russia.
Russia argues that this expansion, and the presence of Nato troops and military equipment near its borders, is a direct threat to its security.
The country seized and annexed the Crimean peninsula in southern Ukraine in 2014 after Ukrainians overthrew their pro-Russian president. Ever since, Ukraine's military has been locked in a war with Russian-backed rebels in areas of the east near Russia's borders.
There are fears that the conflict, which has claimed 14,000 lives and caused at least two million people to flee their homes, may reignite and that Russia's military will cross the border.
The talks came shortly after UK Foreign Secretary Liz Truss accused Russia of wanting to recreate the Soviet Union "or a kind of greater Russia, carving up territory based on ethnicity and language".
Mr Putin must "desist and step back from Ukraine before he makes a massive strategic mistake", she said in a speech in Sydney, Australia, adding the UK was prepared to put severe sanctions in place.
And she warned that an invasion would "only lead to a terrible quagmire and loss of life, as we know from the Soviet-Afghan war and conflict in Chechnya".
The Soviet war in Afghanistan stretched throughout the 1980s. Some 15,000 Red Army soldiers and more than a million Afghans were killed and the country was left in ruins.
Earlier this week, Britain announced it was supplying Ukraine with defensive weapons and extra troops for training.
Meanwhile, Ukraine's ambassador to the UK, Vadym Prystaiko, said Russia's latest actions had already succeeded in diverting attention away from the ongoing conflict.
He told the BBC he still believed there was "a slight possibility" that a "catastrophe" could still be averted, but said: "Sooner or later Putin will have to do something: either withdraw or move ahead."
He said he understood Russia's fears about Nato expansion into eastern Europe, but said Ukraine's primary concerns were for their own people and Nato's military alliance was "the best we can have in this part of the globe".
Asked whether Ukraine would join Nato, he said: "One day, we will."