The investment banking and consulting firm that advised New York city during its financial crisis may recommend to Mayor Marion Barry that the District of Columbia resort to some form of long-term borrowing to solve the city's worsening money problems.

Eugene Keilin, vice president of Lazard Freres and Co., said yesterday that such borrowing could include the city's first sale of general obligation bonds.

Keilin, one of the leading municipal money experts in the country, is former executive director of New York's Municipal Assistance Corporation, the agency set up by the state in 1975 to oversee the financial rescue and revitalization of New York City. Lazard Freres has been hired by the District government to advice it on financial affairs, including entering the municipal bond market.

In cities around the nation, it is unusual -- but not unprecedented -- for operating debts, such as those that make up much of the District's budget deficit, to be erased through sale of general obligation bonds, which are usually paid off through general city revenues, including property taxes.

Some financial experts consider such a practice the equivalent of paying daily bills -- such as carfare and lunch money -- on revolving credit plans.

But the city's financial crisis has become increasingly serious, with Barry's disclosure Tuesday that the city had an accrued budget deficit of $284 million at the end of the last fiscal year. In March, Barry acknowledged that the deficit for the current fiscal year is another $172 million, and he said the District is also suffering from critical cash flow problems.

"If this has to be solved through the District's own resources," Keilin said in a telephone interview yesterday "what you're really talking about is making a loan over a long period of time." Sources said loans of up to 15 years could be involved.

Meanwhile, Barry yesterday made a whirlwind appeal for public support of his handling of the budget crisis, delivering what he has called definitive briefings on the extent of the problem to business leaders and newspaper editorial writers.

The mayor went to Capitol Hill for a 30-minute meeting with Sen. Warren G. Magnuson (D-Wash.). chairman of the Senate Appropriations Committee, in which Barry said he discussed the city's financial plight, but sought no commitments.

Earlier, at a breakfast meeting, he urged business leaders to use their influence to help get more money for the city from Congress.

The financial crisis has been the most all-encompassing issue of Barry's first 18 months in office, and has led to proposals from the mayor of severe program and spending cutbacks, masssive layoffs and steep increases in taxes, license fees and city user charges.

For the current fiscal year, which ends Sept. 30, Barry has proposed the elimination of 1,540 jobs from the city payroll, $24 million in new or higher taxes and reductions in health service payments, the closing of three community health centers as well as several recreation centers.

In addition, Barry has asked that still another 3,000 jobs be eliminated from the city's 44,000-worker payroll by Dec. 31 (including the layoffs of 120 police officers) further spending cuts and a $34-a-year increase in household water and sewer bills to help avert further financial problems in the next fiscal year.

Until Tuesday, the ongoing financial problems were the focus of the mayor's attention. But in the past two days, the $284 million accumulated deficit has become the major item of discussion.

The accumulated deficit is what the city owes at the end of each year to its employes, its suppliers and other creditors -- and even to itself.

The amount of the deficit has crept upward each year, notably since 1970, when the city changed its basic bookkeeping system to reflect cash it has collected and spent and not whatever amounts it has agreed to spend in the future. In effect, the accumulated deficit is what it has agreed to spend but has not paid for.

Because it has not been necessary to pay off the accumulated deficit all in one chunk, the city has managed to keep financially afloat.

It has done so by delaying some payments until cash became available, and it has rolled over many debts from one fiscal year and paid them in the next.

One expert in city finances said yesterday that the $284 million figure puts the city in a much worse light than really is the case. Philip Dearborn, vice president of the Greater Washington Research Center, a privately financed think tank, said a more realistic figure would be $90 million.

Dearborn reached that figure by subtracting $87 million the city owned in interest on its debt and since has paid, the $39 million future cost of salaries that will be paid to city employes when they take accumulated annual leave, and $68 million that was collected in taxes last year that are to be applied to this year's expenses.

In the cases of the interest and the taxes, Dearborn said, the city simply erased the debts and started over again. And, he said, it has no need to pay the annual leave in one lump sum.

Keilin said that even though the city has managed to function despite the mounting deficit for the past 10 years, the problem should be addressed now in order to eliminate the cash flow problem and to ensure a better bond rating if the city begins to sell bonds regularly.

"The best way to add capital is through financing," Keilin said.

Historically, the city has borrowed from the U.S. Treasury. The 1975 Home Rule Charter authorized the city to sell bonds on the commercial market at a potentially lower interest rate. But Congress blocked the effectiveness of that provision until a full audit by a private firm could be made of the city's books, now expected to occur after the end of the current fiscal year, Sept. 30. That timing would permit bond sales to start sometime in 1981.

Keilin said that along with the plan for erasing the deficit would probably come a "comprehensive financial plan" for D.C. government spending over the next three years. He said the nature of that plan has not yet been agreed on.

He said that even a borrowing plan would not remove from the city the burden of having to take in as much in increased revenues as possible, through a larger federal payment from Congress or tax increases, and hold down expenditures as much as possible.

Barry declined to say yesterday what form an ultimate solution to the budget crisis might take.

Barry got some good news yesterday when John A. Wilson (D-Ward 2), chairman of the City Council's finance and revenue committee, said he is prepared to call a meeting of that five-member panel to act on the mayor's tax package.

Barry has counted on council approval of a bill allowing five new or increased taxes that would bring if about $20 million this fiscal year and $60 million next year. Wilson has blocked their approval, contending that Barry has understated the city's financial problems and failed to deal with them comprehensively.

Yesterday, Wilson called a news conference to announce that he had "capitulated" to the mayor and would act on the proposals. But he refused to say whether he himself would vote for the mayor's package. He predicted approval by the full council.