Alliance chief Jens Stoltenberg said Ukraine would join Nato when “the time is right” but will not be offered membership at next month’s summit.
The two men met in Berlin as preparations step up for the 31-leader summit in Vilnius, Lithuania, where allies are expected to commit to boosting military spending.
Germany is also looking to its arms industry to produce more weapons to help Ukraine.
Nato powers, including Germany, have handed over tanks to help Ukraine recapture territory from Russia in a counter-offensive.
Despite this, allies “should brace ourselves for Russia’s war of aggression against Ukraine to continue for a long time,” Mr Scholz told a press conference on Monday.
“We are preparing for that and aligning our policies to it. Germany will support Ukraine for as long as is necessary. We have reserved the necessary money in our budget.”
Russia invaded Ukraine in February 2022 but has failed to seize Kyiv, and the war has descended into a brutal struggle for territory on the southern and eastern front lines.
Mr Stoltenberg said Ukrainians would have a “stronger hand” in possible future negotiations if they can retake territory from Russia.
While some countries in Europe are pushing for Ukraine to be given a clear path to Nato membership, others, such as Germany, see it as a more distant prospect.
“We all want this war to end, but a just peace cannot mean freezing the conflict and accepting a deal dictated by Russia,” Mr Stoltenberg said.
Moscow and the West have blamed each other for the barren prospects of peace talks, with Russian President Vladimir Putin insisting on Friday that the Kremlin was open to discussions.
Meanwhile, Nato is drawing up new battle plans to prepare for a hypothetical Russian attack for the first time since the end of the Cold War.
Mr Stoltenberg is pushing for allies to raise their spending pledges beyond the current target of 2 per cent of GDP – a level that many, including Germany, have yet to meet.
Germany turned a page on its post-1945 pacifism by directly shipping arms to Ukraine and committing to a €100 billion ($109.2 billion) upgrade of its military.
It says the 2 per cent target could be reached next year if this one-off borrowing spree is included.
Mr Stoltenberg said some Nato members would need to spend more than 2 per cent for the alliance to realise its plans for improved capabilities and high-readiness forces.
“I know that it’s never easy to increase defence spending. If you spend more on defence there is less for healthcare, for education, for other important things,” said Mr Stoltenberg, a former prime minister and finance minister of Norway.
“But the reality is that when we live in a more dangerous world we just have to pay the price of investing more in defence.”