A federal administrative law judge, in a precedent-setting decision that could have devastating financial consequences for privately owned utilities, ruled yesterday that a hydroelectric dam in Washington state should be taken away from Pacific Power & Light Co. and given to a public agency.

If the decision by Federal Energy Regulatory Commission law Judge John G. Lotis is upheld by the full commission it is expected to lead to early attempts by dozens of municipalities to wrest hydroelectric projects worth billions of dollars away from private utilities.

But the five-member commission, which now has a Reagan administration majority, has shown signs of wanting to tilt back toward private enterprise in the historic struggle between public and private power interests.

"It is clear to me they may not affirm the judge's decision," Rachelle Patterson of the FERC said.

Yesterday's ruling involving the Merwin Dam, a 136-megawatt hydroelectric project on the Lewis River in southwestern Washington, was based on a unanimous 1980 FERC interpretation of the Federal Power Act. That interpretation held that when privately owned dams come up for relicensing, preference must be given to public agencies if all other factors are equal.

The 11th Circuit Court of Appeals last year unanimously upheld the 1980 FERC interpretation. But the FERC, at a closed meeting on Monday, agreed to ask the Supreme Court to vacate the 1980 "municipal preference" decision and send the case back to the commission for reconsideration.

"The commission is considering reversing the position it took in 1980 and may end the preference for public ownership, so the private companies that built the hydroelectric dams can continue to operate them," Patterson said.

Lotis yesterday cited the 1980 ruling in finding that the plans of two counties adjacent to the Merwin dam for utilizing its electricity serve the public interest as well as the plans of Pacific Power. Hence, invoking municipal preference, Lotis awarded the new license to the public agency.

He also indicated that the public agency would have to pay the utility its original investment in the Merwin Dam less depreciation, which would be about $9.4 million. Pacific Power had asked for at least $832 million, which it said it would need to construct a coal-fired plant to generate replacement electricity.

There is the possibility of a large number of attempts by municipal agencies to take over the more than 500 privately owned hydroelectric dams around the country because many of the original licenses--granted for periods of up to 50 years--are starting to come up for renewal. The licenses would provide access to relatively inexpensive power.

The joint operating authority set up by the two counties applying for the Merwin license contended it could provide power beginning in 1985 to Cowlitz County customers for $102 less per year than they would pay the Bonneville Power Authority. Clark County customers each would save $30 annually, the agency said.

Pacific Power argued, on the other hand, that its customers--particularly in California and Wyoming--would face substantially higher rates if it lost Merwin.