Congress approved the District of Columbia's fiscal 1986 appropriations bill yesterday, including $30 million in added federal funds to build a new prison in the city.

The legislation was included in a catchall spending bill that will keep most of the federal government running through the fiscal year ending next Sept. 30, one of the last measures Congress passed before adjourning for the year.

The final version of the District's $2.7 billion operating budget differed little from the version the city submitted to Congress in the spring. However, D.C. officials had to fend off attempts to impose strict limits on paying for abortions for poor women and new requirements for competitive bidding of city contracts.

In the final hours of the session, Congress passed another bill that will allow the District to issue nearly $200 million in tax-exempt revenue bonds for construction projects at Georgetown University, American University and George Washington University.

The Senate deleted a $4.5 million revenue bond proposed for the Forrest Marbury House Associates Limited Partnership to build and renovate property in Georgetown.

The House approved the bill 344 to 3, sending it to the president.

The prison funds, $10 million for fiscal 1986 and $20 million for fiscal 1987, were added by the Senate. The prison issue is still a matter of intense debate within the District government. Mayor Marion Barry reversed his earlier position against a prison and endorsed the idea early this year, but strong opposition remains within the community and the D.C. City Council.

The city must submit a detailed prison construction plan to Congress for its approval before the funds become available.

Congress also made these additions to the D.C. budget:

*$3.4 million to continue funding an educational and vocational training initiative at the city-operated Lorton Reformatory in Fairfax County.

*$500,000 to continue a truancy program in the District's schools.

*$150,000 to look at ways of reducing the city's high school dropout rates.

*A requirement that the mayor find an additional $15 million on top of $5 million already budgeted to help retire the District's accumulated general fund deficit.

Congress also tacked on a tax exemption for itself, which has nothing to do with either the District or appropriations. The amendment in effect exempts members of Congress who live in the Virginia suburbs, the only local jurisdictions with personal property taxes, from paying the local tax on one car.

The abortion issue arose after the House voted 221 to 199 last July to prohibit the city from using its own funds to pay for abortions for poor women.

The issue stalled action on the District's budget as pro-choice senators threatened a filibuster against strong prolife amendments that other senators wanted to add to the Senate's version of the bill.

But the Senate blocked attempts last month to add strict antiabortion language in its version, instead keeping in an existing restriction against using federal funds for abortions. A House-Senate conference dropped the strong House language earlier this month and accepted the existing, less stringent, restriction with little discussion.

The conferees dropped the House-passed requirement that all District contracts be awarded on the basis of competitive bidding, noting that the city had recently approved its own legislation in an attempt to reform the process.