The Supreme Court ruled 6 to 3 yesterday that consumers can sue price-fixing manufacturers for antitrust damages only if they have bought affected products directly from them.

Consumers or ultimate purchasers almost always buy from middlemen who deal directly with the manufacturers.

The decision preserves the right of middlemen to sue for the triple damages authorized by the antitrust laws even though they have passed on illegal overcharges to final buyers.

Justice Byron R. White, in a lengthy footnote to the opinion for the court, said that the ruling limits the scope of a pro-consumer law enacted last year but invited Congress, if it disputes the ruling to amend the law.

The law, the Hart-Scott-Rodino Antitrust Improvements Act of 1976, authorizes state attorneys general to recover damages for price-fixing on behalf of consumers in their states.

White, in the footnote, said that Congress intended to limit recovery to cases where consumers bought directly from manufacturers. One of the principal draftsmen, Bernard Nash, former assistnat counsel to the Senate antitrust and monopoly sub-committee, told a reporter that White was wrong and had rendered the statute "virtually meaningless."

Sen. Edward M. Kennedy (D-Mass.), chairman fo the subcommittee, said that the law, under the ruling, "will not provide adequate deterrents against antitrust violators. I thus intend to introduce legislation to restore to consumers those private rights which the court has . . . denied them."

Kathleen F. O'Reilly, executive director of the Consumer Federation of America, charged that the court "is blatantly inviting price-fixing."

And Justice William F. Brennan Jr., in a dessent joined by Justices Thurgood Marshall and Harry A. Backmun, noted that "direct purchasers who act as middlemen have little incentive to sue suppliers so long as they may pass on the bulk of the illegal overcharges to th ultimate consumers."

Brennan said the decision "flouts Congress' purpose and severely undermines the effectiveness of the private treble-damage action as an instrument of antitrust enforcement."

The decision involved a treble-damage suit brought by the State of Illinois and 700 local government entities against the Illinois Brick Co., a manufacturer of concrete blocks. The company sold blocks to masonry contractors who, in turn, sold them to general contractors. The blocks ended up in buildings bought by the plaintiffs.

The Seventh U.S. Circuit Court of Appeals held that the state and communities - indirect purchasers or final consumers - could sue if they could prove that the middlemen contractors has passed on to them illegal overcharges. The Justice Departmenet and 49 states, in friend-of-the-court briefs, agreed.

At the center of the issue was a 1968 decision in which the court held that Hanover Shoe Co., which had passed on to she buyers illegal overcharges imposed by United Shoe Machinery Corp., nonetheless was injured and therefor entitled under the Clayton Antitrust Act to sue for treble damages.

Yesterday's decision limited the Hanover decision. If an antitrust violator may not use "a pass-on theory" as a defense against a suit brought by a direct purchaser such as Hanover Shoe, White wrote, then an in direct purchaser such as a shoe-wearer may not use the pass-on theory as an offense.

To allow a pass-on to be used as an offense but not as a defense "would create a serious risk of multiple liability for defendants," White wrote. In addition, he said, such a holding "would add whole new dimensions of complexity to treble-damage suits and seriously undermine effectiveness."

Justice Blackmun, in a separate dissent, termed White's approach "wooden" and expressed regret that "it takes so long and so much repetitious effort to achieve, and have this court recognize, the obvious congressional aim."