Three retired military commanders, including an Air Force general who led the Strategic Air Command until his 1977 retirement. gave strong though qualified endorsements of the new strategic arms limitation treaty yesterday.

The three were called before the Senate Foreign Relations Committee to balance testimony from former admirals Elmo R. Zumwalt Jr. and Thomas H. Moorer, who attacked the treaty in harsher terms than any previous witnesses have.

Zumwalt's and Moorer's position was already well known, but the testimony of retired Air Force general Russell E. Dougherty, commander of SAC from 1974 to 1977, was unexpected. The others who testified for SALT II, retired admirals Noel Gayler and Isaac C. Kidd Jr., had already publicly indicated their approval of SALT.

The three commanders who testified for SALT II agreed that the U.S. military position has deteriorated seriously in recent years, and that strong - and expensive - security measures have to be taken against growing Soviet military capabilities.

Kidd, whose salty humor and curmudgeon manner won over the committee, testified: "We must keep reminding ourselves they are ahead. We allowed them to get there as we blissfully slid down the bannister of strength from superiority to equivalence to 'rough equivalence.'"

In the SALT negotiations, Kidd said, "We seemed simply to run out of things to give up to get what we wanted; so we ended up being dictated to, rather than being strong enough to dictate the terms as we would have preferred - a new and somewhat mortifying position for us."

But, Kidd said, the treaty offers time to take corrective measures: "The alternative of having no ceiling at all, considering our position at this point in the so-called race, I find totally unacceptable, because I know how difficult it is to design and build" new strategic weapons.

Kidd formerly responsible for design and development of the Navy's strategic weapons and then commander of the strategic submarine fleet, said SALT II was an acceptable compromise and "the details on verification" are "marginally acceptable."

Dougherty, retired SAC commander and a popular figure inside the Air Force, said the new treaty is "far better for the United States than no agreement . . . I cheer this whole process, and I commend the step that has been taken in SALT II."

He echoed Kidd's view that much has to be done to strengthen American military forces, but also voiced a positive assessment of SALT II, saying it provides equal limits on the weapons on both sides and helps U.S. planners predict the evolution of Soviet forces. He was less gloomy than Kidd about American negotiating weakness.

Gayler, former director of the Defense Intelligence Agency and commander of U.S. forces in the Pacific, was most enthusiastic of the three, calling SALT II "a good bargain" for both superpowers that puts "a modest cap" on strategic arms and lessens the risk of nuclear war.

Gayler listed what he called four significant Soviet concessions and said only "two or three" were made in return. Defeat of SALT II, he said, "could ruin the arms control process" and could revive the cold war.

"Will the Russians behave better without a SALT treaty than with one?" Gayler asked. "They will not."

Moorer and Zumwalt gave bitterly critical testimony along the lines of previous public statements. Both were members of the Joint Chiefs of Staff in the early 1970s - Moorer was chairman - and both endorsed the first Salt pact in 1972 while pressing for military spending that Congress never approved, Zumwalt said yesterday.

Moorer decried what he called a general decline of American strength and will. He said SALT II should be rejected because of provisions he said were unfair to the United States - the work, he said, of American negotiators whom he labeled "the world's worst."

Zumwalt attacked "inadequate leadership" for negotiating a bad treaty and also for unilaterally canceling arms programs that might have strengthened the U.S. bargaining position. SALT II, he charged, "grants juridical strategic nuclear superiority" to the Soviet Union.

Under sharp senatorial questioning, both admirals argued that SALT II would actually prohibit the United States from building weapons systems that might be desirable - a position flatly denied last week by the Joint Chiefs of Staff and others.

Questions by Sen. Joseph R. Biden Jr. (D-Del.) pushed Zumwalt to shift his position about the significance of the Soviets' SS18 supermissile, so that Zumwalt eventually acknowledged that this weapon did not pose a unique threat to U.S. missiles.

Zumwalt said the joint chiefs once wanted to build a missile closer to the size of the huge SS18 than the proposed new MX, but Biden later announced to the hearing that, according to the Pentagon, the JCS had never made such a request.