The Supreme Court ruled yesterday that the Internal Revenue Service can force the sale of a couple's jointly owned home if one spouse is behind in federal taxes.

The government can sell the property to collect the back taxes, the court said, but must compensate the innocent party from the proceeds. In addition, the justices said that judges may use their discretion to protect the innocent party from extreme "disclocation."

The 5-to-4 ruling, which applies to any form of partnership, affirms a longstanding IRS practice that the government contends is the only way to collect from many delinquent taxpayers. The practice was threatened by lower court decisions in Texas that were overturned yesterday by the justices.

At issue was a Texas law that barred sale of the portion of the property owned by the innocent partner. A widow, Lucille Bosco Rodgers, and a divorcee, Joerene Ingram, challenged the IRS' authority in separate cases.

The IRS had moved against Rodgers' home in Dallas to collect $900,000 in federal wagering taxes, with interest and penalties, allegedly unpaid by her deceased husband.

The Ingram home, severely damaged by fire, had been sold. The IRS went after the proceeds from the sale because the former husband allegedly failed to pay $9,000 in taxes withheld from the wages of employes of his company.

Justice William J. Brennan Jr., writing for the court, said he was not "blind to the fact that in practical terms financial compensation may not always be a completely adequate substitute for a roof over one's head."

But the IRS power "is necessary to the prompt and certain enforcement of the tax laws," he said. The Constitution gives federal law the "right to sweep aside state-created exemptions," such as the Texas statute, Brennan said. And it "is as potent in its application to innocent bystanders as in its application to delinquent debtors."

Brennan said lower court judges should take care to properly apportion the proceeds of a tax sale, making sure that the government gets only what it deserves and that the innocent third party receives "complete" compensation for the value of the interest held.

Judges also may refuse to allow a tax sale in extraordinary circumstances, he said.

Justice Harry A. Blackmun, joined by Justices William H. Rehnquist, John Paul Stevens and Sandra Day O'Connor, dissented from part of yesterday's ruling in U.S. vs. Rodgers et al.

Blackmun said that the government can force the sale of property only if the delinquent taxpayer had the legal right to sell it on his own. "Mrs. Rodgers has an indestructible property right under Texas law to use, possess and enjoy her homestead during her lifetime," Blackmun wrote.

Because "she is not herself indebted to the government, I dissent . . . ," Blackmun said. He and the other justices agreed that the IRS could take the proceeds from the Ingram property.

In other action yesterday:

* The court ruled that workers deprived of seniority rights because an employer enters into an affirmative-action agreement may be able to collect back pay. The unanimous ruling was feared by both employer organizations and the Equal Employment Opportunity Commission, which said it might discourage companies from conciliating employment discrimination complaints.

A large number of discrimination complaints now are being resolved by court orders and agreements resulting in the layoff of white workers in place of less senior minority workers. The legality of those orders and agreements, as recently raised in a case involving the Boston police and fire departments, was not at issue in yesterday's case, W.R. Grace & Co. vs. Local Union 759.

The controversy arose when the the company laid off workers at its Southbridge Plastics Division in Corinth, Miss. The firm recently had conciliated a discrimination complaint brought on behalf of women and blacks by the EEOC and was torn between that agreement and a bargained seniority system. The firm, therefore, faced a possible violation of federal civil rights law and violation of a union contract.

The company chose to lay off senior white workers to protect the minorities and the women. The white workers and their union successfully sought back-pay damages in two arbitration proceedings. The company countered by obtaining a court order declaring that the discrimination agreement should prevail.

The justices, upholding the 5th U.S. Circuit Court of Appeals yesterday, ruled in favor of the back-pay awards made by the arbitrators. The lower court had no authority to interfere with the arbitration, Blackmun wrote for the unanimous court.

He acknowledged the company's "dilemma," but said it was "of the company's own making. The company committed itself voluntarily to two conflicting contractual obligations," Blackmun said, and was "cornered" by its own actions.

* In another labor case, Bill Johnson's Restaurants vs. NLRB, the court voted unanimously to limit the National Labor Relations Board's authority to halt state court lawsuits stemming from labor disputes.