A Massachusetts law requiring every woman under 18 who hasn't married to have the consent of both parents or a judge to get an abortion was struck down by the Supreme Court with an 8-to-1 ruling yesterday.

But the court did not lay down clear guidelines. Four justices in the majority addressed the constitutionality of a hypothetical abortion law; the other four said they should't have done that.

Justice Lewis F. Powell Jr. announced the judgment of the court. He also wrote a plurality opinion, which will be controlling and was signed by Chief Justices Potter Stewart and William H. Rehnquist, in which he found the law to fall short of constitutional standards in two key respects.

It allows a judge to deny approval for an abortion to an unmarried, divorced or widowed minor even though she may be mature and fully competent to decide not to have a child.

It requires such a minor always to consult or notify her parents, but doesn't assure her that she will have an opportunity to persuade a judge that she is mature enough to consent to an abortion or that an abortion would serve her best interests.

By contrast, Justice John Paul Stevens concluded that the law is unconstitutional because no minor-no matter how mature and capable of informed decision-making-may have an abortion without the consent either of both parents or of a judge.

Thus the law impermissibly subjects every decision of a minor to secure an abortion "to an absolute third-party veto," Stevens wrote in an opinion signed by Justices William J. Brennan Jr., Thurgood Marshall and Harry A. Blackmun.

The decision drew condemnations from both sides of the abortion issue. Pro-abortion groups objected to it because it did not give minors an absolute right to decide for themselves about an abortion. Some anti-abortion groups, who believe parents should have an unqualified right to decide for their children, objected to it because it allows the courts a role.

In his opinion, Powell wrote that a state has a right to encourage an unmarried teen-ager to seek parental advice about abortion. But if the state required parental consent, he said, it must provide an alternative procedure for a judge or an administrative agency to authorize an abortion.

For the National Conference of Catholic Bishops and the United States Catholic Conference. Archibshop John R. Quinn of San Francisco termed the decision "a grave blow to human rights and family relationships," one that "goes a long way toward tearing apart the fabric of the family."

Quinn found a "cruel logic" in the Powell opinion's saying, in effect, that judges are better qualified to decide intimate family questions than are family members themselves.

The Abortion Rights League, while welcoming the invalidation of the Massachusetts law, said that "in requiring parental consent or judicial review, the court has potentially denied access to safe, legal abortion to literally thousads of teen-agers."

Eleanor Smeal, president of the National Organization for Women, said that the court's "disarray" confirms "what common sense indicates: the judicial system was not designed to make personal decisions for individuals."

For the American Civil Liberties Unions, staff counsel Janet Benshoof protested that Powell's opinion "leaves the door open for statutes which will involve both parents and the courts . . . The ACLU will litigate against any future statute impeding a minor's right to choose."

Powell, rejecting Stevens' criticism that he improperly had written an "advisory" opinion on how a state could modify the Massachusetts approach to conform to the U.S. Constitution, wrote that it would have been "irresponsible" simply to invalidate the law "without stating our views as to the controlling principles."

In a separate opinion, Justice Rehnquist said he signed Powell's opinion lest "literally thousands of judges be left with nothing more than the guidance offered by a truly fragmented court."

Actually, he said, he agrees with Justice Byron R. White, who in 1976 dissented to a ruling condemning a Missouri blanket law authorizing a parent to withhold for any reason consent to a minor's abortion.

Yesterday, White dissented anew. He reiterated the view he set out in 1976, but said that even if the Missouri law were invalid, the Massachusetts laws not automatically condemned.

"Until now," White wrote, "I would have thought inconceivable a holding that the United States Constitution forbids even notice to parents when their minor child who seeks surgery objects to such notice and is able to convince a judge that the parents should be denied participation in the decision."

Massachusetts enacted the law in 1974. A panel of three federal judges struck it down. On appeal by the state, the Supreme Court nullified the judgement on the ground that the panel should have abstained and sent the case to the Supreme Judicial Court of Massachusetts with a directive to answer particular questions about the law.

The panel did that, then held for the second time that the law was invalid. The state again challenged the decision.