Navy Secretary John F. Lehman Jr. claimed victory yesterday in his dogfight with McDonnell Douglas Corp. on the price of its F18 fighter.

The St. Louis firm, teamed with the Northrop Corp. of Century City, Calif., in building the F18 to serve the Navy and Marine Corps as a fighter and light bomber, agreed to sell the plane at $22.5 million each. That would save about $1.2 million on each plane, the Navy said.

Lehman told The Washington Post on Aug. 31 that he would cancel the $40 billion F18 program and buy Grumman F14 fighters and A6 bombers if the price of the F18 did not come down to that figure.

Under the agreement announced by Lehman at the Pentagon yesterday as McDonnell Douglas Chairman Sanford N. McDonnell stood by, every F18 bought with fiscal 1982 money would be purchased at that price.

The $22.5 million price tag is known as the "flyaway" cost and does not count extra engines, often part of an airplane sale, nor a share of the research expenditure.

At one point in the Pentagon briefing, McDonnell said "you have to cut down people to realize cost savings." Lehman contended that the $22.5 million price tag would not necessarily force the firm to reduce its work force, declaring expected overseas sales of the plane will "more than compensate" for any losses incurred on sales to the Navy and Marine Corps.

The F18 battle is far from ended, however. The agreement announced yesterday covers only one year of production.

The plane is currently undergoing tests with the fleet to determine such factors as how long it can remain on station when loaded with missiles and fuel. Critics claim the F18's short range still makes the F14-A6 package a threat to future purchases of the McDonnell Douglas plane. Congress appropriates money for the F18 and most other weapons only one year at a time.

Counting the aircraft to be bought with fiscal 1982 money, the Navy has committed itself to purchasing 211 of the projected total of 1,366 F18s. About $5 billion of the projected $39.7 billion has been committed to the F18 program to date, according to Lehman.

"We believe this is a genuine breakthrough for the Navy which brings the price of the airplane to where its future is assured," Lehman said.

"I look forward to producing the F18 in quantities," said McDonnell.

A former Pentagon executive who was deeply involved in the F18 program expressed skepticism about whether the Pentagon would actually save money by driving down the price on one of many products a defense contractor makes.

He said overhead charged to the government can be redistributed to cover losses and warned that savings claimed on the F18 may push up some prices on the F15 fighter, also manufactured by McDonnell Douglas.