The Supreme Court ruled yesterday that it doesn't have to hear appeals of certain constitutional rulings by the highest tribunal of the District of Columbia although the rulings may involve laws passed by Congress.

The ruling, which divided the justices 5 to 4, came in a case involving a District of Columbia law that invalidates bequests to religious institution or clergymen if made less than 30 days before the donor dies.

A year ago, the D.C. Court of Appeals struck down the law, which Congress enacted in 1866 to prevent clergymen from trying to arrange death-bed bequests. The appeals court said the law infringes on the free exercise of religion guaranteed by the First Amendment and denies the due process of law guaranteed by the Fifth Amendment.

Because the law applies only in the District of Columbia despite passage by Congress it is not a "statute of the United States," Supreme Court Justice Potter Stewart wrote in the majority opinion.

As a result, he said, the decision is not reviewable by direct appeal to the Supreme Court, instead, it can be brought to the High Court only by a petition for review. Whether such a petition is granted is discretionary with the court.

For the dissenters, Justice Byron R. White wrote that District of Columbia laws are now "in a unique class: they are neither statutes of a state nor statues of the United States.Whether the District of Columbia Court of Appeals upholds them or strikes them down, there is no appeal to this court."

White went to say acidly, "If Congress had intended that its enactments were to be treated as mongrel statues, distinct from the recognized classifications of the judicial code, it surely would have said so."

The case hinged on the 1970 law that modified the structure and jurisdiction of the courts in the District of Columbia. The law said that for purposes of appeal to the Supreme Court, the D.C. Court of Appeals is equal to the "highest court of a state."

Justice Steward said, however, that the legislative history does not clarify whether Congress intended to allow appeals of rulings on statues of purely local concern. "This "courts's mandatory appellate jurisdiction over state-court judgments . . . is reserved for cases threatening the supremacy of federal law," he said.

Disagreeing, Justice White said that the majority holding "is inconsistent with the prior decisions of this court and contrary to the congressional scheme determining Supreme Court jurisdiction . . ."

He also said that the majority has "a solemn obligation" to hear the cases Congress intended it to hear, but now "shirks that duty" by trying to reduce its work load with a "strained construction" of the 1970 law.

The case at issue began on Oct., 1972, when Sallye Lipscomb French, a 90-year-old widow, made out a will bequeathing about $140,000 each to Calvary Baptist Church, of which she was a long-time member, and St. Matthew's Roman Catholic Cathedral, where her husband had been active. The churches had made no effort to influence her.

She died three weeks after making out the will. Her heirs, a brother and 11 nephews and nieces, most of whom received individual bequests, sued in Superior Court to invalidate the church bequests under the 111-year-old law.

The Superior Court ruled the law unconstitutional and the ruling was affirmed. Yesterday's Supreme Court decision means the churches will get the money.

In addition to the District of Columbia, six states have so-called mortmain laws forbiding death-bed bequests. But the District of Columbia law was unique in restricting such bequests to religious institutions.

In a footnote to Supreme Court opinion, Justice Stewart said the decisions of the D.C. courts "do not necessarily raise doubts the constitutionality of the somewhat similar" state laws.