The District of Columbia ended the 1982 fiscal year with a $13.1 million surplus in general operating monies, but it was more than offset by a 91 percent increase in the deficit for the city's water and sewer fund, according to a certified audit released yesterday.

The audit, conducted by a team led by Arthur Andersen & Co. and presented to the City Council by Mayor Marion Barry and his top budget aides, showed that for the second straight year the mayor stayed well within his operating budget.

But increased deficits in separate accounts for water and sewers, D.C. General Hospital and the D.C. Armory had the effect of erasing the operating surplus. The net effect was a $6 million increase in the city's long-term accumulated debt, bringing it to a total of $345 million.

Moreover, the operating surplus reported yesterday was much smaller than the $68 million surplus for fiscal 1981 the auditors reported a year ago.

While Barry was upbeat in presenting the document, several council members warned that the city's long-term financial welfare would be threatened unless the deficit spending could be stemmed.

"I don't want to rain on your parade," said City Council member John A. Wilson (D-Ward 2), chairman of the Finance and Revenue Committee. "We have no deficit in the operating fund, and that should be commended. But we should never say we're in a comfortable position" with the large deficits in the other funds.

Barry said that the perennial shortages in the water and sewer fund could only be eliminated if the council approves his plan to double water rates within the next five years.

The city spent $100 million to provide water and sewer service in 1982, but collected only $83 million in revenues, resulting in a deficit of $17 million.

"We have not had a rate increase since 1980," Barry said. "The general fund is carrying the deficit. It should not be doing so."

The mayor said that escalating costs of chemicals, federally mandated improvements at the Blue Plains treatment center, and high interest rates have all contributed to the city's rising water costs.

With the addition of the $17 million deficit for fiscal 1982, the accumulated debt in the water and sewer fund rose from $18.7 million to $35.7 million in 1982, an increase of 91 percent. Meanwhile, D.C. General's deficit grew 18 percent to a total of $10.7 million, and the Armory's debt rose 14 percent to $2.5 million.

Those deficits undermined the effect of the $13.1 million surplus in the general operating fund. The general fund, taken alone, showed a decrease in its deficit from $309.5 million to $296.4 million.

The city's chances for obtaining a good credit rating to borrow money in the private bond market would be hurt unless it can get its deficit spending under control, according to the mayor.

"It affects us when we go to the bond market because they look at all of our expenses, all of our funds," Barry said.

Council member Charlene Drew Jarvis (D-Ward 4) said the city's deficit problem may be even worse than is indicated by the city's 1982 balance sheet if a $144 million shortage in the city's employe pension program is taken into account.

"It's one of the biggest problems we have in government and yet it doesn't get reflected anywhere," Jarvis said.

The audit report showed that during fiscal 1982 the city raised $1.6 billion in revenues--about $12.8 million less than had been anticipated.

To balance the operating budget, Barry's administration was forced to spend $14.5 million less than was originally budgeted, including reductions of $2 million for housing, $1 million for recreation and $200,000 for police.

The administration was also helped by an unexpected credit of $5.4 million from Metro to compensate for a previous overpayment.

While Barry took credit yesterday for balancing his operating budget for the second straight year, Wilson said the audit actually confirmed what he has been saying all along--that the city's budget was operating in the red because of problems with the water and sewer fund.

Council Chairman David A. Clarke and other members complained that much of the information in the audit could have been provided to them earlier, to help them in deliberations over the proposed fiscal 1984 budget.