The Supreme Court ruled 7 to 1 yesterday that the state cannot discipline a lawyer for offering the free aid of a nonprofit group to try to vindicate the basic rights of a person who is ignorant of those rights or can't afford to sue.

At the same time, the court ruled 8 to 0 in a companion case that a state can discipline a so-called amulance-chaser who may be inclined to put his interests ahead of a client's.

In both cases, the court balanced what Justice Lewis F Powell Jr., in the opinions for the court, described as conflicting rights.

One right is freedom of speech and association. The First Amendment guarantees it to lawyers along with everyone else.

Another right is that of a state to prevent lawyers from using freedom of speech and association to solicit business in ways that can defraud, unduly influence, intimidate or otherwise exploit distressed, injured or unsophisticated persons.

The nonprofit group's lawyer was Edna S. Primus of Columbia, S.C.. She cooperated without pay with the nonprofit, nonpartisian American Civil Liberties Union in 1973 when the ACLL tried to stop certain certain physicians in Aiken County, S.C., from giving pregnant mothers on public assistance the choice of being sterilized or giving up Medicaid benefits.

Primus wrote to one of the mothers, Mary Etta Williams, sayong that the ACLU, in her behalf, would like to file a damage suit against Dr. Clovis H. Pierce, who had sterilized Williams after the birth of her third child.

Actually, no suit was filed because Williams, in taking her third child, who was ill, to see the physician, encountered his lawyer and signed a paper releasing Pierce from liability. She telephoned Primus from Pierce's office to say that she had decided not to sue.

Neverttheless, the letter led the state supreme court's disciplinary board to administer a private reprimand to Primus for "attempting to solicit a client for a nonprofit organization." In March 1977, however, the court, on its own initiative, upped the ante to a public reprimand.

The court based its action on the possibility that the ACLU - not Primus - would have benefited financially from the court award of consel fees if it had sued Primus and won.

Actually, Powell wrote in the opinion for the U.S. Supreme Court, the state conceded that Primus got "no compensation" and "neither ACLU nor any lawyer associated with it would have shared in any monetary recovery . . ."

The letter to Willaims "comes within the generous zone of First Amendment protection reserved for associational freedoms," Powell wrote.It imparted material for an informed decision as to whether to litigate, was not misleading and involved no appreciable invasion of privacy, he said.

Along with other organizations such as the NAACP, the ACLU exists not with the primary aim of financial gain through recovery of consel fees, but with the goal of litigating to enhance "effective political expression and association," Powell pointed out.

In the final part of the opinion, Powell wrote that it does not foreclose "narrowly drawn rules to proscribe solicitation that in fact is misleading, overbearing or involves other fratures of deception or improper influence," although he did not "delineate the precise contours of permissable state regulation."

This drew objections from Justices Harry A. Blackmun and Thurgood Marshall on the main ground that it is "dicta," unnecessary to the decision. Marshall said it could deter lawyers "from continuing to volunteer their services in appropriate cases." He also termed "particularly troubling" an additional Powell "dictum" that "a state may insist that lawyers not solicit on behalf of lay organizations that exert controls over the actual conduct of any ensuing litigation."

In the second case, the court affiemed the Ohio Supreme Court's disciplining of Albert Ohralik, who until recently practiced in cleveland and Montville.

Learning that two 18-year-old women had been seriously injured in an auto accident. He contacted them while they were still in pain and while one was still intraction in hospital. He also secretly recorded conversations with one victim and with the family of the other.

Tempting them "with what sounded like a cost-free and therefore irresistible offer," Powell wrote, Ohralik won their consent - later rescinded - to damage suits.

Justice William H. Rehnquist, dissenting in the ACLU case, said he was unpersuaded that there is "a principled basis for concluding" that the Constitution barred disciplining of Primus but not of Ohralik.