The House Appropriations Committee voted yesterday to restrict Mayor Marion Barry's right to reduce the size of the District of Columbia police force as part of his economy drive.

In an unusual and perhaps unprecedented action, the committee said the mayor must not cut the police departmentbelow 3,880 uniformed officers and 543 civilian empolyes without getting specific consent from both the House and Senate subcommittees that review D.C. funding.

The committee restriction was contained in the formal report on the city's budget for the 1981 fiscal year, which begins Oct. 1, and effectively has the force of law. The restriction is similar, but falls short, of the binding prohibition that the city has against levying a tax on the incomes of suburban commuters.

Barry, through an aide, labeled the action on police manpower an "anti-Home Rule restriction" and promised to fightit in the Senate.

"Obviously, the mayor is upset" that the House panel voted the restriction, Alan Grip, his spokesman, said.

Larry Melton, local vice president of the International Brotherhood of Police Officers, said his union lobbied strongly for the restriction in fear that the mayor would allow the size of the police force to decline.

The amendment would require the city to maintain the police force during the coming fiscal year at its present strength. If pending retirements result in a decline, Melton said the provission is intended to force the mayor to hire new officers to replace those who depart.

The committee report added strength to an earlier decision by the D.C. Appropriations Subcommittee toadd $6.4 million to police funding in order to maintain the force at its current strength.

That attempt was led by Rep. William H. Natcher (D-Ky.), a long time supporter of a large police force. Thecommittee acted without debate on the police provision, which was mentioned only in passing by the subcommittee's new chairman, Rep. Julian C. Dixon (D-Calif.), a Washington native.

Several times in years past, Congress has criticized proposed cuts in the city's police force, and the city administration has obliged by not making them. Yesterday's action marked the first time that a Congressional panel had placed such opposition in the form of quasi-law.

The pohibition on police reductions came as the committee approved a $1.52 billion municipal operating budget for the 1981 fiscal year, which starts Oct. 1. The money bill is supported in part by a record U.S. payment of $296.6 million.

Before approving the measure, the committee rejected by voice vote a proposal by Rep. Clarence E. Miller (R-Ohio) to cut $6 million from the federal payment as part of an effort "toshow some discipline spending."

Supporting Miller, Rep. Robert N.Giaimo (D-Conn.), who also is chairman of the House Budget Committee asserted that he has "never seen a city as badly managed, that's run so badly. It's an absolute outrage."

Giaimo complained that the federal payment to the city has risen escessively from $44 million to nearly $300 million to 15 years.

Responding, Rep. Sidney Yates (D-Ill.) said the federal government "wants to make this (city) a showplace .. . for the many millions of people who come here."

No attempt was made at yesterday's committee meeting to attach a rider to the budget that would prohibit the District of Columbia from spending its own tax money to pay for abortions for poor women under the Medicaid program.

That set the stage for an attempt by Rep. Robert K. Duornan (R-Calif.) and other allies of the antiabortion movement to seek a ban on all publicly financed abortions when the budget bill reaches the House floor, probably next Wednesday.

A similar near-total ban on D.C. abortions funded by either federal or local funds was voted last year by the House, but a compromise with the Senate ultimately permitted the city tocontinue spending its own locally raised tax money for abortions. The bill that will reach the House floor next week prohibits federal funding but the local funding of Medicaid abortions.

The budget approved by the committee is $3.4 million smaller than the version approved by Barry. Dixon's subcommittee cut $11.8 million from some programs while adding the $6.4million for the police department and another $2 million to help reduce the number of layoffs of teachers in the school system.

In addition to the operating budget, which pays the day-to-day costs of city functions, the committee aproved $248 million in construction programs that are financed by loans fromthe U.S. Treasury. When the two are added together, the total congressionally - appropriated budget would total $1.76 billion.

The committee approved an outlay of $15 million for pay increases for city and school employes, enough to increase salaries by an estimated 5 percent. This would be short of the 9 percent or more that federal employes are expected to get on Oct. 1. Mayor Barry has said he would not recommend any pay raise until after the city budget is approved by Congress.