The Gramm-Rudman-Hollings budget reduction act may be wreaking havoc in many places, but it could mean a one-time windfall of $16 million or more for one of the Reagan administration's least favorite nations: the Republic of Panama.

It could also drag the Panama Canal Treaty, still an unswallowed stone in the throats of American conservatives, back into the political arena.

The Panama Canal Commission, the U.S. government agency that runs the waterway, apparently will have to cut its fiscal 1986 spending -- like any other agency under Gramm-Rudman -- by as much as six percent, despite commission protests that this would cripple canal operations.

While spending would be reduced, operations revenues in the form of fees for ships using the canal have already been set for this year, and under the 1977 treaty, any savings or profit the canal commission makes must go to Panama, not to the U.S. Treasury.

"I've been going bonkers with this damn thing for three weeks," Michael Rhode Jr., secretary of the canal commission, said yesterday. "Everybody agrees it's dumb and it's not the intention of the [Gramm-Rudman] law . . . ."

As a presidential contender, President Reagan attacked the canal treaty as a giveaway of valuable U.S. real estate to an unreliable leftist government. "We're not going to give it up to some tinhorn dictator," he used to say.

Conservatives perennially call for renegotiating the treaty to reduce required U.S. payments to Panama or to extend U.S. control over the canal past the year 2000, when Panama assumes full control.

This development is likely to rouse them to new effort.

Any attempt to change the status quo would, of course, also arouse Panama. The required payments make up a big chunk of the country's $2 billion annual budget. A Panamanian Embassy official yesterday declined to comment on the projected bonus, but Panama already has contended that the United States has been derelict under the treaty in not making more of a profit for Panama's benefit.

Panama's windfall could be substantially more than $16 million, depending on how Gramm-Rudman works. The commission's fiscal 1986 budget is $425.8 million, all of which comes from canal tolls, but nobody knows whether Gramm-Rudman's percentage cut is to be applied to that total or to what is left over after other payments required under the treaty are made to Panama and the U.S. Treasury.

Besides collecting any profit the commission earns, Panama gets about $75 million a year under the treaty in fees, payments in lieu of taxes and shares of tolls collected.

The commission pays $19.6 million for an employe retirement fund and $9.6 million in interest on U.S. investment in the canal.. That leaves about $322 million in capital, maintenance and operating expenses, and cutting that by 5 percent -- as expected under Gramm-Rudman -- would reduce outlays by $16 million, leaving that much extra revenue. All would go to Panama.