Groups on both sides of the abortion issue appear to agree that the Supreme Court's 5-to-4 ruling Wednesday leaves the constitutional right to abortion hanging by a thin thread. One side says it hopes, the other says it fears, that a one-vote switch will be all that is needed to cut that thread.

But a closer look at the five opinions in Thornburgh v. American College of Obstetricians & Gynecologists suggests that both sides may be overreacting, ignoring substantial differences among the dissenters. There are still up to seven votes supporting a woman's right to an abortion -- the same number as in 1973 when the landmark abortion case, Roe v. Wade, established that right.

A one-vote switch, through the departure of one of the aging majority justices, undoubtedly would produce a majority more inclined to increase states' power to regulate, discourage and restrict abortions.

But it would not be enough to turn the clock back 13 years to a time when abortions were banned in most states. That more likely would require a three-vote switch.

Only two justices, Byron R. White and William H. Rehnquist, reject the idea that women have such a constitutionally protected right and would allow states to ban abortion outright. That was their position in 1973, and it has not changed.

It is equally clear that two others, Chief Justice Warren E. Burger and Justice Sandra Day O'Connor, are greatly unhappy with Roe v. Wade. They insist that states should have a far greater role regulating abortion -- but neither has shown any inclination to join the hard-liners in declaring no constitutionally protected right to abortion.

On the contrary, Burger's strong protest in the Pennsylvania case decided Wednesday was based on what he felt was the majority's improper extension of the 1973 decision to eliminate any legitimate state interest in protecting a "viable fetus."

Burger, who has dissented in past cases involving state regulation of abortion, cited language in the Roe v. Wade ruling that "the right to an abortion 'is not unqualified and must be considered against important state interests in regulation.' "

Burger dissented in a 1976 case when the court said states may not require minors seeking an abortion to first obtain parental consent. He insisted Wednesday, as he did in 1977, that Roe v. Wade "simply requires that a state not create an absolute barrier to a woman's decision to have an abortion."

Burger's statement Wednesday that "I agree we should reexamine Roe," though significant, appears to reflect a desire to restrict the right to abortion not eliminate it.

O'Connor, another consistent critic of the legal reasoning in Roe v. Wade, repeated her strong objections to its "outmoded trimester framework." The 1973 ruling allows greater state regulation as the fetus approaches viability, severely restricting abortions in the third trimester unless the mother's health is in jeopardy.

But O'Connor specifically did not join White and Rehnquist. In addition, the views she outlined in a 1983 case, Akron v. Akron Center for Reproductive Health Inc., which she summarized Wednesday in her dissent, can hardly be read to place her in that camp.

O'Connor would preserve a role for federal judicial review of state regulations, with substantial judicial oversight when states "impose an undue burden on the abortion decision."

O'Connor, more than Burger, appears eager to overhaul, if not overrule, much of Roe v. Wade. But she would establish different "principles for evaluating state regulation of abortion" rather than eliminate judiciary oversight entirely.

Wednesday's ruling shows that the court is closely divided, but not over whether women have some substantial right to abortion. The division is between those who would be willing to strike down most state regulation automatically and those who would engage in a balancing process more favorable to state regulations.

Four of the five justices in Wednesday's majority are over 77. If President Reagan, who urged the court to adopt White's view, has a chance to replace three with staunch antiabortionists, the right to abortion might be abolished.

But Reagan has only about 18 months left in which to make court appointments; nominations sent to the Senate after January 1988 could have a tough time getting through. It may well fall to the next president to cast the deciding vote on this issue.