Mayor Marion Barry returned fire yesterday in a dispute with the D.C. City Council over a proposed salary increase for police officers, charging that the $23 million cost of the new contract could force him to ask for a tax increase next year.

"I was thinking seriously about a tax reduction in fiscal 1987," the mayor told reporters at his monthly press conference. "But with the $23 million, if it is allowed to stand, I am going to have to consider the possibility of raising taxes."

Council Chairman David Clarke and council member Wilhelmina Rolark (D-Ward 8), authors of emergency legislation approved by the council Tuesday aimed at blocking Barry's efforts to have the contract overturned, said the council -- not the mayor -- will have the final say on whether taxes will be raised next year.

"That is his reaction," Rolark said. "I don't have any control over what he speculates. All I know is that we play a key role in taxes."

Clarke said that $7.8 million already has been set aside to help cover the $23 million of additional costs, which would be spread over the three-year life of the new contract. The cost of the police contract, Clarke said, represents a relatively minor percent of the city's overall budget.

"I am disturbed that the mayor continues to be defending large amounts to particular people in the way of city contracts and consulting fees but when it comes down to a small amount for a large number of people he gets fiscally conservative," Clarke said.

On other topics, the mayor:

*Defended his decision last week not to discipline James F. Palmer, director of the D.C. Department of Corrections, after a police investigation found that Palmer's subordinates failed to notify him or Fairfax County officials that shotguns and teargas were used to quell a riot at the Lorton Reformatory.

*Said he will not alter his hands-off policy regarding the controversy surrounding a shelter operated by the Community for Creative Non-Violence on Second Street NW, which a federal judge ruled on Tuesday may be closed by the U.S. government. Barry rejected a request by CCNV leader Mitch Snyder to appeal directly to President Reagan to intervene.

The police contract legislation approved unanimously on Tuesday requires Barry to send the contract to the council within 10 days for final approval. An arbitration panel ruled this year that the city's 3,400 police officers should receive a 15 percent pay increase over three years.

The Barry administration asked the D.C. Public Employee Relations Board (PERB) to reverse the panel's findings. After the board declined to do so, the city filed suit against the board and the Fraternal Order of Police (FOP). Last month, D.C. Superior Court Judge Gladys Kessler ordered the board to review its previous decision upholding the arbitration panel.

Gary Hankins, chairman of the FOP's labor committee, said yesterday that the mayor "is trying to turn the city's residents against its police officers with the threat of a tax increase."

Hankins said the added cost of the police pay increase would be about $16 million, not $23 million. In addition, he asserted that Barry administration officials, in their arguments before the arbitration panel, never said the city could not afford to fund the pay raise sought by the FOP. Instead, Hankins said, city officials argued they did not want police pay to rise above its traditional level of parity with firefighters.

Barry, in his news conference, accused the City Council of "undermining the collective bargaining process" by forcing him to send over the police contract. He said he had not decided whether to veto the bill.

The mayor, noting that PERB is scheduled to hold its court-ordered rehearing on the contract next week, appeared hopeful that PERB may reverse its earlier stand. Since June, when PERB initially refused to reverse the arbitration panel's findings, board Chairman Willard Wirtz resigned and has been replaced by William H. Rumsey, who previously has held two cabinet-level posts in the Barry administration.