The Reagan administration has endorsed a bill that would create a civilian inspector general at the Pentagon with limited power to uncover waste, fraud and abuse in the military.

Deputy Defense Secretary Frank C. Carlucci recently told a Senate panel that President Reagan is willing to go along with a bill sponsored by Sen. William V. Roth Jr. (R-Del.) that would put a civilian watchdog at the Pentagon, but keep him leashed.

Under Roth's bill, the defense secretary could veto any investigation by the inspector general, but the secretary would be required to explain his decision to Congress within 30 days.

The Defense, Justice and Treasury departments were exempted in 1978 when a law was passed putting inspectors general in place as internal watchdogs at most federal agencies. Under the Roth bill, inspectors at Justice and Treasury wouldn't be required to clear their investigations, but they would be limited to probing "financial, not policy decisions."

Congress originally exempted the military because it was afraid an aggressive investigator might accidentally expose a national security secret. (The services do have inspectors general throughout the military to hear appeals of internal management decisions.)

Now attitudes have changed. With the defense budget growing, the idea of a Pentagon watchdog has gained more support.

When Defense Secretary Caspar W. Weinberger took control, he appointed his own watchdog--Joseph H. Sherick, who serves as an assistant to the secretary. But Congress wants to make sure it has a permanent Pentagon investigator. The problem now is how to win support from those senators who don't want any military muzzle. "If we keep playing buddy-buddy with DOD , what kind of an inspector general will we have?" asked one critic, Sen. Thomas F. Eagleton (D-Mo.).