A U.S. Court of Appeals panel ruled yesterday that a form that the Social Security Administration used last year to obtain the tax records of welfare recipients to check if they were cheating the government was improper and invalid.

In a unanimous ruling, the three-judge panel said the form, mailed in May, 1982, to 4 million aged, disabled and blind Supplemental Security Income recipients, violated Internal Revenue Service regulations.

The form, which requested the recipients' permission to obtain the IRS's confidential records, also "contained poorly veiled threats" that benefits would be terminated if recipients failed to sign the form, the panel said.

The panel said the agency should come up with a consent form that "contains no veiled threats" or Congress should approve a specific exception to the general rule that tax information is confidential.

The agency mailed the consent forms in response to repeated criticism from Congress that it had failed to weed out an estimated 88,000 people who illegally receive about $140 million each year because their assets total more than $1,500 per person. The agency argued that using the tax information was the only feasible way to catch them.

While the panel criticized the agency yesterday, the opinion also blamed Congress for "speaking with two separate minds" in creating laws to protect the confidentiality of tax information, while insisting that the Reagan administration catch cheaters. Those were "conflicting goals which can present difficult dilemmas," the panel said.

The panel said that a "knowing and intelligent waiver" of confidentiality rights might permit the IRS to release tax records, but "the form used in this case makes a mockery of the consent" required to waive that confidentiality.

The opinion, written by U.S. Circuit Court Judge Abner J. Mikva, sets aside rulings last year by two U.S. District Court judges, who declined to stop the agency from getting the tax information.

Government attorneys said yesterday that they were considering whether to appeal the decision to the full court of appeals.

Three million recipients have signed and returned the consent form, but the IRS has not released the tax information to the SSA. Government lawyers have said in court documents that no action has been taken against those who did not sign the form.