The D.C City Council, overriding objections from the mayor's legal advisers, passed legislation yesterday to extend the city's controversial rent control system until 1980 and authorize rent increases annually.

Under the complex measure, most of the city's tenants would face rent boosts next year, ranging from 2 per cent to 10 per cent. Some rent rises would, however, be considerably steeper. In 1979 and 1980, most rent increases would be linked, in part, to rises in the Labor Department's consumer price index.

The new legislation, approved by a 12-to-1 vote, would allow rent increases of 2 per cent next year increases of 2 per cent next year for landlords whose rents do not include any fuel or utility costs.

A 7 per cent rent rise would be allowed if heating and hot water costs are included in landlords' rents. An 8 per cent boost would be permitted if rents cover heats, hot water and electricity. Rents could be increased by 9 per cent if heat, hot water, electricity and cooking fuel are included. A 10 per cent rise would be allowed if all utilities' costs, including air conditioning, are covered.

These rent increases appear likely to be put into effect next April or May, under the Council measure.

The Council sought to soften the impact of the proposed rent increases for some tenants by creating a multimillion dollar rent subsidy program, intended to provide aid for low-income, elderly and disabled renters. The Council has not yet set aside funds to finance the subsidy plan.

The Council's final vote on its long debated rent control measure followed by one day a D.C. Court of Appeals ruling that upheld the city's 3-year-old rent control system. The court decision, nonetheless, prompted renewed criticism of the Council's proposal.

Louis P. Robbins, the city's principal deputy corporation counsel and a key legal adviser to Mayor Walter E. Washington, warned in a memo yesterday that one controversial provision of the Council's legislation may conflict with the court ruling.

Robbins noted that the Council had sought to prevent landlords, in most instances, from increasing rents more than once a year, and he said this restriction may amount to "unconstitutional confiscation" - a denial of landlords' rights to earn a resonable return on their properties.

The Council brushed aside such objections, with some Council members contending that any major change in the bill would violate key compromises.

It remained unclear yesterday whether the mayor would sign or veto the Council's bill. In addition to the criticism raised by the mayor's legal aides, a spokesman for mayor expressed concern yesterday over the proposed rent subsidy program, saying, "The bill authorizes a subsidy, but the actual money is not provided."

The mayor also has previously expressed some support for ending rent ceilings on high-priced, luxury apartments during the next few years. The Council's legislation permits no such move.

The Council's bill drew renewed criticism from landlords yesterday, but cautious support from tenant groups. Sheila Boykin, an organizer for the Emergency Committee to Save Rent Control, said she was pleased that the bill would continue rent control - util Sept. 30, 1980 - but she described the proposed rent rises of up to 10 per cent next year as "too high."

John T. O'Neill, executive vice president of the Apartment and Office Building Association of Metropolitan Washington, the largest local landlords' group. charged that the city government had further delayed rent increases that had been designed to offset expenses incurred by landlords during 1976. "It's a little bit to little, too late for a lot of properties," O'Neill said.

The only dissenter in yesterday's Council vote was Councilman Douglas E. Moore (D-at large), who charged that the Council had "sold out the poor people on fixed incomes" by authorizing sharp increases in rents.