Prime Minister Margaret Thatcher, seeking to stem public pressure for a NATO compromise with the Soviet Union to stop deployment of new nuclear missiles in Britain and Western Europe, declared today that only a "firm approach" with the Soviets will lead to reductions.

Speaking as leader of a NATO nuclear power, Thatcher appeared to be shoring up President Reagan's resolve to adhere to his proposed weapons buildup unless the Soviets agree to major cutbacks, regardless of widespread calls in the United States and Europe for greater flexibility.

"Weakness will tempt" the Soviets, she said in a televised interview. "If you want nuclear weapons reduced in the world, you have to take the firm approach."

Deployment of Pershing II and cruise missiles in five European countries should proceed as scheduled, she said, unless the Soviets agree to cut their SS20 missiles targeted on Europe to "zero."

After a week in which Reagan felt it necessary to assure U.S. allies that his arms policy is not in "disarray," Thatcher's strong support should be welcomed with relief in Washington. She specifically seemed to endorse Reagan's strategy of refusing to publicly consider any bargain with the Soviets on the intermediate-range nuclear missiles that grants Moscow a permanent edge in the land-based weapons.

Opposition to nuclear arms in Britain, West Germany and elsewhere in western Europe has increasingly focused on the Reagan administration's insistence that all Soviet missiles targeted on Europe be withdrawn--the so-called "zero option"--in return for a cancellation of NATO plans to match those weapons.

Thatcher's remarks, while not specifically ruling out eventual backing for something short of Reagan's proposal, cast her as the most unequivocal booster in the alliance of going ahead with deployments should negotiations fail by the time they are scheduled to begin in December. West German Chancellor Helmut Kohl also reportedly has pledged to Reagan that deployments will proceed, but he faces a national election March 6 in which nuclear arms are a major issue.

The cruise missiles are also scheduled to be placed in Italy, Belgium and the Netherlands.

Thatcher could face an election later this year, although she said again today that she favors completing her full five-year term, which runs until May 1984. But her statements in the interview left no doubt that at this stage she will not be swayed by public protests or criticism of her nuclear policy by opposition political parties.

The Soviets, she said, "want to act in such a way that they can have a preponderance of SS20s over similar land-based weapons on our side. They want to make us vulnerable." Only because of the West's firmness, she added, had the Soviets recently shown a willingess to make reductions.

She did not, therefore, dismiss the prospect of future cutbacks in cruise missiles if negotiations continue beyond the start of deployment. It will take years to complete the siting of new NATO missiles, she said, noting, "there will be plenty of time to get them down provided the Russians will reduce theirs." This suggested that Thatcher would endorse a step-by-step reduction in Soviet weapons while those in the West were deployed until the two sides reached an agreed level.