The Supreme Court ruled yesterday that the government can use evidence its agents steal from one person to help convict another.

The ease stemmed from the Internal Revenue Service's hiring in 1972 of a private investigator, who illegally entered an apartment and stole documents from a banker's briefcase.

The documents were used to convict Jack Payner of tax evasion in 1976 as part of the IRS "Project Haven Investigation of secret Bahamas bank accounts.

The justices ruled 6 to 3 yesterday that since the banker, and not Payner, was the victim of the breach of privacy, the evidence could be used at Payner's trial. Only a breach of a defendant's rights would warrant its exclusion, they said.

The court also ruled that it was wrong for lower court judges in the Payner case to throw out the conviction simply as a deterrent to future illegal schemes by the government. Such "supervisory" exercises over the government exceed the court's authority, Justice Lewis F. Powell Jr. wrote for the majority.

The decision removes a potentially powerful incentive for government investigators to obey the law. They may or may not be punished for illegal acts, but, under yesterday's opinion, the fruits of a similar project such as "Haven" -- or a raid on a psychiatrist's offices, for example -- could still be useful in court.

Project Haven, which was discontinued in 1977 after it was publicized, was an IRS attempt to obtain documentary proof that Americans were using offshore banks in the Caribbean to hide income and evade taxes. One of the suspect banks was the privately owned, Nassau-based Castle Bank and Trust.

A Jacksonville IRS agent hired a private investigator to focus on one of Castle's vice presidents, Michael Wolstencroft. The investigator arranged for a female associate to lure Wolstencroft to dinner one night in Miami.

While they were out and under surveillance, Wolstencroft went to the banker's apartment, removed a briefcase and delivered it to IRS agent Richard Jaffe. Jaffe had 400 documents copied and returned to the briefcase.

Among the papers were records showing a relationship between Castle Bank and Payner.

A U.S. District Court judge convicted Payner of tax evasion but then immediately voided the conviction because of the government's illegal acts. The judge acknowledged that, under prior Supreme Court rulings, Payner's rights had not been directly violated and the evidence was admissible. But he excluded the evidence anyway, citing the judicial responsibility to guard against "knowing and purposeful" violations of fundamental rights.

Powell yesterday rejected the lower court's decision. "The defendant's Fourth Amendment rights [search and seizure] are violated only when the challenged conduct invades his legitimate expectation of privacy, rather than that of a third party," he said.

The courts may not use supervisory powers to set up a deterrent to illegal conduct in the absence of a constitutional violation against the defendant, he said.

"We certainly can understand the District Court's commendable desire to deter deliberate instrusions into the privacy of persons who are unlikely to become defendants in a criminal prosecution," Powell wrote.

But "unbending" exclusion of other wise admissible evidence in order to "enforce ideals of government rectitude would impede unacceptably the truth-finding functions of judge and jury."

Powell said it was up to the government or private plaintiffs to seek punishment of illegal break-ins, noting that the abuses of Project Haven were exposed at U.S. Senate hearings.

The IRS said yesterday that it was not aware of any disciplinary actions taken against its agent in connection with Project Haven.

Justices Thurgood Marshall, William J. Brennan Jr., and Harry A. Blackmun dissented, arguing that the majority decision created a "sword to be used by the government to permit it deliberately to invade one person's Fourth Amendment rights in order to obtain evidence against another person.

"Unlike the court," Marshall wrote for the dissenters, "I do not believe that the federal courts are unable to protect the integrity of the judicial system from such gross government misconduct."

In other action yesterday:

The court ruled 7 to 1 that Medicaid recipients living in nursing homes have no constititional right to contest government decisions forcing them to move.

The case stemmed from a decision by Pennsylvania health officials to close a nursing home for its alleged failure to meet standards. The residents, objecting to the decision, demanded a hearing.

The court ruled yesterday that the residents are not owners of the nursing home and, by residing there, have no special interest entitling them to hearings when an order is issued against the home's owner.

The court ruled that lawyers who "unreasonably and vexatiously" delay or complicate cases can be forced by a federal court to pay the other side's legal fees.

The justices ruled 6 to 3 that a Louisiana judge had the power to penalize lawyers in a civil rights case for delays in responding to questions from the other side.

The ruling applies only in narrowly defined circumstances where there is a showing of "bad faith" by a lawyer.