WASHINGTON (AP) _ The Supreme Court today agreed to decide whether workers may sue in state courts when they allege their employers fired them to avoid paying pension benefits.

With millions of dollars at stake, the court said it will use a Texas case to decide whether such state lawsuits are precluded by a federal law protecting pension benefits.

The court is expected to rule sometime in 1991.

The justices agreed to hear an appeal by Ingersoll-Rand Co., which was sued by fired sales representative Perry McClendon.

McClendon was transferred by the company from San Antonio to Dallas in 1979 to develop a sales market there for the company's construction equipment. He was fired on Nov. 19, 1982, four months before his 10th anniversary with the firm.

A worker with 10 years experience is entitled to have his pension vested, meaning the employer must contribute to the employee's retirement benefits.

McClendon sued in state court in Texas, accusing Ingersoll-Rand of firing him to avoid paying pension benefits. The company said it dismissed him to reduce its workforce and save money.

The federal Employee Retirement Income Security Act of 1974 (ERISA) protects workers' pension rights.

But McClendon did not sue in Texas courts for lost pension benefits. In fact, shortly after he sued, the company agreed to vest his pension.

McClendon sought a potentially big-money judgment for lost future wages, mental anguish and punitive damages.

The Texas Supreme Court last October overruled lower state courts and revived the lawsuit, ordering a trial.

Many states accept the principle that an employer's ability to fire a worker at will is limited by public policy, the state court said. For example, the state court said, workers may claim they were fired illegally because of sex, race or age discrimination or for exercising their collective bargaining rights.

''We hold that public policy favors the protection of integrity in pension plans and requires in this case an exception to the employment-at-will doctrine,'' the state court said.

McClendon is entitled to damages if he can prove he was fired because Ingersoll-Rand wanted to avoid paying pension benefits, the state court said.

The U.S. Chamber of Commerce and other business groups urged the U.S. Supreme Court to overrule the Texas court and hold that the federal pension law pre-empts such lawsuits.

The Chamber of Commerce said lawsuits by fired workers against their former companies already have mushroomed.

The organization cited one study showing the national average for damage awards based on wrongful firing rose from $227,280 in 1986 to $311,332 in 1987.

Allowing fired employees to sue over the pension issue will prompt thousands of additional suits that could be devastating to American business, the Chamber of Commerce said.

It noted that the aging of the so-called baby-boom generation already poses a threat to the financial stability of pension plans.

If the Texas court ruling is upheld, the Chamber of Commerce said, ''At the same time that pension plans are being put to their most stringent financial tests, thousands of employees who are about to vest in their pension rights will be able to bring (lawsuits) for wrongful discharge seeking extensive compensatory and punitive damages.''

The case is Ingersoll-Rand vs. McClendon, 89-1298.