The Supreme Court, blunting an important legal weapon of environmentalists, ruled yesterday that private citizens and organizations such as the Sierra Club cannot sue under a federal law they use to protect rivers and wetlands from pollution.

The decision to enforce the law is now exclusively up to the federal government, which is expected to reduce its enforcement efforts dramatically under the Reagan administration.

The court reversed a 9th U.S. Circuit Court of Appeals ruling sought by environmentalists in their decade-long battle to block construction of the Peripheral Canal -- a controversial 42-mile-long channelin Califoria that is among the largest water-diversion projects in the country -- planned to help bring fresh water from the moist regions of the northern part of the state to the arid south.

The Sierra Club and others sued under the Rivers and Harbors Appropriation Act of 1899, contending that the proposed canal and other water-division projects polluted northern California fresh water with salt water.

But the justices ruled unanimously yesterday that only the federal government, not private parties, could bring such an action.

The opinion does not end the California dispute, which is expected to go to referendum soon. But it cripples many other current and future anti-pollution suits by environmentalists by denying them the right to go to court under the law, which regulates interference with navigable waters.

The need for the court to consider the legality of private suits stems from Congress' frequent unwillingness when legislating many laws to say who, besides the government, can use it. The Burger court has increasingly restricted private access to the courts in such situations.

The section of the Rivers and Harbors Act in controversy yesterday "does not indicate an intent [by Congress] to provide" for private suits, Justice Byron R. White wrote for the majority in California v. Sierra Club. Nor did he find anything in congressional debates to suggest them, he said.

"On the contrary, the legislative history supports the view that the act was designed to benefit the public at large by empowering the federal government to exercise its authority" over the waters, he wrote. "Congress was not concerned with the rights of individuals."

Justice William H. Rehnquist, joined by Chief Justice Warren E. Burger and Justices Potter Stewart and Lewis F. Powell Jr., agreed with the ruling but wrote separately. Justice John Paul Stevens did the same.

In another water-pollution case yesterday, the justices reversed lower courts in Illinois that had imposed stringent cleanup measures on the city of Milwaukee for its dumping of sewage into Lake Michigan.

The decade-old case began when the state of Illinois, which gets Milwaukee's waste as it flows south in the lake, sued the city. The state of Wisconsin, acting for the federal Environmental Protection agency, already required certain cleanup measures and permits for the dumping. But Illinois -- citing the common, or unlegislated judge-made laws governing public nuisances -- sought and won a more far-reaching order mandating the construction of expensive new sewage-treatment facilities.

Yesterday the court said that the lower courts acted improperly in resorting to the common law when Congress has enacted a law for such situations -- the Federal Water Pollution Control Act amendments of 1972, under which Wisconsin imposed the less stringest requirements.

The federal law may allow weaker controls, Rehnquist wrote for the court, but it "provides a forum for the pursuit of such claims before expert agencies by means of the permit-granting process. It would be quite inconsistent with this scheme if federal courts were in effect to 'write their own ticket' under the guise of federal common law . . . ."

Justices Harry A. Blackmun, Thurgood Marshall and Stevens dissented, noting that in 1972 the Supreme Court had allowed the Illinois suit to go ahead under common law. Congress enacted the amendments to the Federal Water Pollution Control Act that same year, however, and the majority said this pre-empted the common law.