Eighteen U.S. communities have been given the go-ahead to sell 1,305 public housing units to the low-income families living in them, the Department of Housing and Urban Development said yesterday.

HUD will require that the homes remain affordable to poor families if they are resold within five years. But after five years, local authorities can decide how, or whether, to impose limits on the amount of profit an owner can make. Without curbs, owners who improve their homes could sell them at prices high enough to remove the units from the low-income housing stock.

"I don't think five years is long enough," said Rep. Barney Frank (D-Mass.), chairman of the House Government Operations Committee's housing subcommittee. "Obviously, the best constructed units in the most economically upgraded neighborhoods may no longer be available to poor people 10 years from now." He said most local housing authorities will impose their own, indefinite restrictions on resales, "but not all will."

Democrats in Congress do not object to sale of public housing or allowing low-income owners to make profits in resales, said a spokesman for the House Banking Committee's housing subcommittee, headed by Rep. Henry B. Gonzalez (D-Tex.). "Our concern is that the federal government has a responsibility for replacing units they are taking out of the low-income housing stock."

A 28-unit housing development in the District, Wylie Courts, is one of the projects chosen to take part in the trial public housing sale. Wylie Courts, at 13th and I streets NE, will be converted to condominiums with units available to residents at prices ranging from $40,000 to $50,000, which is higher than the prices for most of the projects. The project was built with the notion that the units eventually would be sold, and tenants were selected with that in mind.

The city Housing Finance Agency will provide 30-year loans at 10.75 percent interest, the HUD announcement said. Total monthly housing expenses are estimated to run about $460 to $575 a month -- or about 30 percent of an eligibility income of $19,000.

A second D.C. project is one of five others being considered as demonstration sites for the remaining 691 housing units to be sold.

The sale of public housing to its occupants is a pet Reagan administration plan. HUD Secretary Samuel R. Pierce Jr. said he is convinced it "holds great promise" and that HUD has been careful not to "dictate" too many details of how local housing authorities should handle it.

Plans by the 16 public and two Indian housing authorities taking part in the demonstration include a variety of financing proposals and types of ownership, including outright purchase, condominium and cooperative. All will sell the units at far below market prices and provide mortgages at below-market interest rates, according to HUD.

Once a unit is sold, the federal government will no longer subsidize it. The government will continue to make payments on debt incurred in the original development and in rehabilitation, but an official said HUD has not totaled up the amount of the debt.

Warren T. Lindquist, assistant secretary for public and Indian housing, said the agency wants the units being sold to remain within the price range of other low-income families. "Nothing in this program . . . has as an objective to get rid of public housing," he said.