Finland and Sweden are considering joining the NATO alliance. Finland will decide in the next few weeks, Prime Minister Sanna Marin said on Wednesday.
"There can be no more talk of any nuclear–free status for the Baltic - the balance must be restored," said Medvedev, who was Russian president from 2008 to 2012.
Medvedev said he hoped Finland and Sweden would see sense. If not, he said, they would have to live with nuclear weapons and hypersonic missiles close to home.
NATO did not immediately respond to Russia's warning.
The entry of Finland and Sweden into NATO would be one of the biggest strategic consequences of the war in Ukraine. Finland gained independence from Russia in 1917 and fought two wars against it during World War Two. Sweden has not fought a war for 200 years.
Russia said in 2018 it had deployed Iskander missiles to Kaliningrad, which was captured by the Red Army in April 1945 and ceded to the Soviet Union at the Potsdam conference.
The Iskander missile, widely used in current war against Ukraine, is a short-range tactical ballistic missile system that can carry nuclear warheads. Its official range is 500 km.
"Let's hope that the common sense of our northern neighbours will win."
Lithuanian Defence Minister Arvydas Anusauskas said Russia had deployed nuclear weapons in Kaliningrad even before the war.
"Nuclear weapons have always been kept in Kaliningrad ... the international community, the countries in the region, are perfectly aware of this," Anusauskas was quoted as saying by BNS. "They use it as a threat."