The Supreme Court, refining its guidelines for public aid to students in sectarian schools, acknowledged yesterday that it was leaving the wall of separation between church and state as it has been in the past: "blurred, indistinct, and variable . . ."

The court ruled that the Constitution allows a state to provide standardized testing and scoring and diagnostic and therapeutic services, as well as textbooks, to pupils in church-related schools.

But the court also held that the First Amendment barrier to laws "respecting an establishment of religion" forbids provision of instructional materials other than textbooks, of instructional equipment, and of field-trip transportation for children in parochial schools.

The decision upheld most but not all provisions of an Ohio law designed to stay within the bounds of a 1975 ruling by the court on state support of education in non-public schools. A panel of three-federal judges had upheld the entire law.

Ohio Catholic leaders said that overall impact of the ruling would be a welcome one: a major financial break for their schools.

The American Jewish Congress said, however, that the decision reiterates the court's determination to bar "transparent devices," such as a loan of expensive equipment, from nullifying the First Amendment's establishment of religion clause.

Officials in Maryland and Virginia said the decision would have no immediate impact on their schools.D.C. officials could not be reached for comment.

The nine justices aligned differently on the major issues and at times expressed unease over certain of their votes. Justice Harry A. Blackmun wrote the opinion for the court. Only one other justice, Potter Stewart, subscribed it in full.

Justice William J. Brennan Jr. alone contended that the Ohio law "in its entirety" offends the First Amendment. He wrote that "ingenuity in draftsmanship" cannot obscure an $88.8 million two-year subsidy by Ohio taxpayers to sectarian schools. "The court nowhere evaluates this factor in determining the compatability of the statue with the Establishment (of religion) Clause, as that clause requires," he said.

Justice Lewis F. Powell Jr. recognized that the court's decision "in this troubling area draw lines that often must seem arbitrary." He also said that "the broadest implications" of some of the language in the 1975 decision would make it "impossible to sustain state aid of any kind" to sectarian schools. He went on to say:

"The persistent desire of a number of states to find proper means of helping sectarian education to survive would be dommed. This court has not yet thought that such a harsh result is required by the Establishment Clause. Certainly few would consider it in the public interest."

Blackmun said that to be contitutional, a law such as Ohio's must pass a three-part test: it "must have a secular legislative purpose, must have a principal or primary effect that neither advances nor inhibits religion, and must not foster an excessive government entanglement with religion." Five other justices agreed or did not dissent.

Justice John Paul Stevens rejected the test in favor of another devised in 1947 by the late Justice Hugo L. Black: "No tax in any amount, large or small, can be levied to support any religious activities or institutions, whatever they may be called, or whatever form they may adopt to teach or practice religion." Justices Thurgood Marshall and Brennan also dissented.

The court ruled 6 to 3 that Ohio is free to buy textbooks approved for public schools and lend them to children attending sectarian schools, and to supply parochial students with the same testing and scoring services it provides to students in public elementary and secondary schools.

Stevens, in dissent, said the line drawn by the Contitution should have "a fundamental character" - one that doesn't differentiate between "instructional materials like globes and maps on the one hand and instructional materials like textbooks on the other." Brennan and Marshall also dissented.

Only Brennan dissented to the provision of diagnostic speech, hearing and psychological services. Marshall, joining him in dissenting to the provision of therapeutic, guidance and remedial services, said such services "are clearly intended to aid the sectarian schools to improve the performance of their students in the classroom."

The vote to strike down the provision of secular instructional materials and equipment and of transportation for field trips on a basis equal to that for public schools was 5 to 4. The dissenters were Chief Justice Warren E. Burger, and Justices Byron R. White, William Rehnquist and Powell.