Thousands of ex-husbands and ex-wives of federal retirees would automatically get a chunk of their former spouses' monthly pensions under legislation that has cleared the House with the strong backing of the Carter Administration.

The bill would authorize the government to make the deductions from annuity checks if ordered by a state court as part of a property right settlement. Currently, 27 states including Maryland and Virginia, recognize annuities as a property right that is divisible in divorce actions. It would also apply to divorces obtained in the District of Columbia.

At the moment, the government can only make deductions from annuity checks to satisfy court-ordered alimony and child support. The bill would expand that to include property settlements in states where annuities are considered part of such settlements.

States where the annuity deduction would apply in divorce cases include California, Texas, Colorado, New Mexico, Arizona and Utah.

After getting a nudge from the White House, the House approved the bill (H.R. 8771) by a lopsided 369-7 vote. It now goes to the Senate where passage is considered a sure thing. Carter Administration aides have assured Rep. Gladys N. Spellman (D-Md.), who pushed the bill, that the president will sign it when the Senate completes action.

No one has an estimate of the number of ex-spouses who would benefit from the bill. But if the national divorce rate is applied to the federal service, which has 2.6 million employes and more than 800,000 retirees, that would mean hundreds of thousands of divorced persons would be eligible for part of their former spouses' annunities. The deductions would be made for them only so long as their ex-spouses lived. It would not continue after death as a settlement benefit.

The annuity deduction in H.R. 8771 does not apply to pensions for the military, or to the Foreign Service. However, similar legislation is pending in Congress to do it, and it certainly would be pushed along if the measure pertaining to regular civil servants and postal employees becomes law.

Under legislation cleared by Congress two years ago, federal and military wages and pensions can be garnished for alimony and child support, if those claims are backed by a state court order. Officials say that thousands of pay and pension checks from the government are already being garnished to satisfy alimony and child support decrees.