Navy Secretary John F. Lehman Jr. has sailed through his first budget battle with Deputy Secretary of Defense Paul Thayer without losing a ship, but Thayer is now challenging the heart of Lehman's fleet, its aircraft carrier battle groups, defense officials said yesterday.

Thayer, as part of an ongoing fight with Lehman over the Navy's share of the Pentagon budget, has ordered a fresh assessment by Navy and civilian analysts of whether the Navy plans to spend too much money to protect carriers with ships like the new DDG51 destroyers, expected to cost more than $1 billion each. Officials said the analyses will influence the size and composition of future Navy shipbuilding budgets still in contention at the Pentagon.

"We've reached the point of diminishing returns in spending so much for defending the carriers," Thayer is said to have argued in recent meetings of the Defense Resources Board (DRB), a top-level group of Pentagon civilian and military leaders.

These officials, under Thayer's chairmanship, recently finished the first round of the fiscal 1985 budget, which featured verbal slugfests between Thayer and Lehman. At one point in August's last DRB meeting an exasperated Thayer is said to have told Lehman, "Shut up."

"Mercy!" Lehman reportedly replied.

Defense officials said that Thayer and Lehman each won and lost something during the first round of DRB meetings but that their bigger battles will come after the White House advises the Pentagon how much money it is likely to get from President Reagan's new budget.

As guidelines for fiscal 1985, the military services have been using last year's projections, which are considered unrealistically high in light of Congress' cuts this year in the fiscal 1984 budget.

Lehman, officials said, came to the DRB budget meetings with a fiscal 1985 budget containing lower inflation projections and fuel costs than the rest of the Pentagon was using. The Navy budget, sources said, also assumed that shipbuilding costs could be held down and contracts signed in the first two months of the fiscal year to achieve savings. Thayer challenged all these assumptions.

As Thayer and Lehman were squaring off on the question of whether the Navy budget was sound, Defense Secretary Caspar W. Weinberger, officials said, came into the meeting Thayer was chairing and seemed to some participants to be siding with Lehman on his austere budget projections.

As it turned out, Lehman's shipbuilding program survived Thayer's challenge with only slight change, officials said, but the Navy secretary had to make cuts elsewhere in his budget to make up for the artificially low inflation and fuel cost projections Thayer rejected.

"Thayer won, in that the Navy had to come with more than $700 million in cuts," said one defense officials. "Lehman won, in that he got his shipbuilding program through without losing any ships." But defense officials predict Lehman or his successor will have to stretch out the shipbuilding programs to absorb the cuts on the way from both the White House and Congress.

During the turbulent August DRB meetings, Navy and Marine leaders had warned their allies that Thayer was out to take some $10 billion away from the Navy over the coming five years and give it to the Army to help that service organize and equip five light divisions.

Thayer has denied that this was his intention as he challenged the Navy on its plans to keep building aircraft carriers and buy billion-dollar destroyers to protect them.

He did say in an interview during those August meetings that he felt the Army had not fared as well as the other services in the first two years of the Reagan defense buildup.

According to those who know his thinking on this issue, Thayer does not feel that any cuts the White House imposes on the Pentagon's projected fiscal 1984 budget have to be distributed equally among the services.

This could mean deeper cuts for the Navy than the Army in the next round of the budget battle. Reagan's original fiscal 1984 budget called for $65.4 billion in total obligational authority for the Army and $86.9 billion for the Navy and Marine Corps.

Despite those storm clouds, Navy leaders, apparently buoyed by their budget victories in Congress these past two years and their success with their shipbuilding program in DRB debates, are sounding decidedly upbeat about the Navy's future these days, as dramatized by their speeches last week at a change of command ceremony at the Naval Academy.

Lehman told the audience of Navy officers and families that Reagan recently had made a significant statement of commitment to the new Navy as he named the two nuclear aircraft carriers under construction after presidents Washington and Lincoln. Lehman underscored the part of Reagan's Aug. 11 announcement in which the president said, "We . . . dedicate ourselves to achieving the requisite naval superiority we need today by building a 15-carrier, 600-ship Navy."

Chief of Naval Operations Adm. James D. Watkins, in sharp contrast to the gloomy forecasts of many of his predecessors in the post-World War II era of the shrinking fleet, told the Annapolis audience that "all the signs are positive in the Navy today. We can be outnumbered 3 to 1 against the Soviets and win."

Watkins' optimism differs with the pessimistic warnings of such predecessors as retired Adms. Elmo R. Zumwalt, who was chief of naval operations from 1970 to 1974, and Thomas B. Hayward, who served from 1978 to 1982.

Zumwalt, for example, said in an interview that the Navy had shrunk to the point that if he had had to order it to fight the Soviets during the Yom Kippur war of 1973, "The odds are very high that they would have won and we would have lost."

Hayward caused consternation in the Senate Armed Services Committee on Feb. 5, 1981, when he testified that "the trends of the last decade have led us to this point where even a slim margin of superiority" over Soviet naval forces "has to be set aside . . . . Your country is overexposed and underinsured. Our margin of comfort is totally gone."