Mayor Marion Barry plans to ask Congress for a retroactive increase in the District of Columbia's municipal credit ceiling to help erase $63 million in overspending on highway construction projects.

One high ranking city official said yesterday that the action, which could be opposed in Congress, is partially designed to improve the city's financial image when, in about two years it begins to borrow money on the private bond market instead of from the U.S. Treasury, as it now does.

The $63 million was spent over 16 years. All of it was borrowed to help complete various freeways, bridge, street and alley projects that wound up costing more than the amount of money Congress originally authorized the city to borrow for the projects.

The city already has begun paying the U.S. Treasury back for the additional money, which one city official said was a "a marginal" amount in the District's $121 million annual expenditure to repay loans and interest.

The congressionally enacted home rule charter that has governed the District since 1975 limits the city's total long-term debt to 14 percent of the city's annual revenue. As tax collections and the federal payment rise, so does the debt limit.

But without the formal increase in borrowing authority from Congress, the city technically will remain above its credit limit, and could have a tarnished image when it enters the highly competitive municipal bond market.

To a large extent, the problem and its resolution is somewhat of a shell game.

Transportation director Douglas N. Schneider Jr. said $28.5 million of the debt could be erased by shifting unused borrowing authority from already approved projects that will not be built, or completed projects for which all the authorized borrowing authority was not necessary.

The other $34.6 million deficit would be erased if Congress, in approving a supplement to the city's capital works budget for the 1979 fiscal year, formally grants the city the authority to borrow money it already has borrowed.

The projects on which money was overspent, Schneider said, include portions of the E Street connecting interchange of the inner-loop freeway, near the Kennedy Center, and some portions of the center-loop freeway.

Schneider said the completed or abandoned projects from which excess borrowing authority could be taken include the Dupont Circle underpass, the North Central and Anacostia Freeway projects and the Potomac River Freeway.

One well-placed member of Mayor Barry's cabinet said asking for the authority to erase the entire debt in one stroke would not have an adverse impact on the city's financial standing and would not require additional funds.

One knowledgeable Capitol Hill source said, however, that Congress might oppose granting all the authority at once if it were not convinced that the problem is urgent. "The horses are already out of the barn,"

Once Congress authorizes the city to borrow money for a project, the Treasury almost automatically lends the money and does not keep track of how much is being borrowed for each particular project.

Some of the overspending resulted from the effects of inflation, Schneider said. Other excess expenditures occurred, city officials said, because expenses for management and operation costs of the projects were larger than expected.

According to one knowledgeable administration official, overspending was one of the most alarming financial irregularities discovered by the Barry administration shortly after it took office Jan. 2.

The source said that city officials were aware of the problem more than a year ago but that nothing was done about it. When Barry took office, the source said, he became worried because the bookkeeping system in use made it impossible to determine exactly how the additional management funds had been spent.

Colin F. S. Walters, assistant city administrator for financial management, said other departments also may have overspent funds. "I suspect we'll have similar problems in other accounts," Walters said, "but not of that magnitude."

Barry, in a prepared statement accompanying the announcement of overspending, said it was "apalling that this deficit was allowed to continue the source said. "Why soak up all this money at once."

Schneider said the deficit went unnoticed because the Transportation Department and its predecessor, the Department of Highways and Traffic, had a accounting system separate from the rest of city government which also lacked proper controls.