State and local health officials are advocating that sexual partners of AIDS patients be traced, contacted and tested as a means of slowing the spread of the deadly disease, particularly to the heterosexual population.

In an editorial in this week's Journal of the American Medical Association, Dr. Dean Echenberg of the San Francisco Department of Health urges action to educate infectious individuals and to prevent the heterosexual spread of AIDS from becoming more common.

The editorial accompanies a study from the Walter Reed Army Institute of Research here that confirms the heterosexual spread of AIDS, particularly among individuals with multiple sexual partners or sexual contact with prostitutes. Another study from the National Cancer Institute reported that in rare instances the AIDS virus may also be spread to hospital workers who, in turn, may infect their sexual partners.

"We know that AIDS is spreading within the heterosexual population. The only question is how fast and how widely," Echenberg wrote. "If we do nothing, we can expect multiple generations of infection to extend unchecked into the heterosexual community."

Using a model long employed by public health officials in dealing with venereal diseases such as syphilis and gonorrhea, Echenberg proposed that "all AIDS patients be interviewed to obtain their heterosexual contacts" and that these contacts be asked to undergo a blood test to see if they have been exposed to the virus. If so, they would receive education and counseling to help prevent further spread of the disease to others.

A pilot program using this approach is under way in San Francisco, said a health official there. And a new set of guidelines by the Association of State and Territorial Health Officials recommends "contact tracing" as one new strategy for consideration.

Kristine Gebbie, head of the group's AIDS task force and administrator of the Oregon health division, said yesterday that she expects to start such a program in her state next month and that several other states also are considering it.

But civil liberties experts expressed concern about the implications of tracing sexual contacts of AIDS patients, questioning whether the names of individuals would remain confidential.

"Frankly, it sounds like an Orwellian nightmare: the government keeping a list of sexually active Americans," said Thomas Stoddard, a lawyer with the American Civil Liberties Union in New York.

Although the approach has been used extensively with other sexually transmitted diseases, Stoddard noted that the "social consequences of being on the list are far graver than with any other disease" and that there is no cure or treatment for AIDS at this point.

"It's an idea that has to be looked at carefully," said Dr. James O. Mason, acting assistant secretary for health in the Department of Health and Human Services. "It deserves to be tried, to look at both the positive and negative aspects."

He plans to wait and see what happens in San Francisco and other areas before recommending national guidelines.

"The protection of public health does interfere, to a certain extent, with individual choices so they do not threaten the general population," said Oregon's Gebbie.

But she and other health officials argued that they have a long history of successfully protecting the confidentiality of venereal disease patients and that the risks of AIDS are so severe that more needs to be done to curb the spread of AIDS among the general population.

In San Francisco, where AIDS is already a major problem among homosexuals and 40 to 60 percent of gay men already may have been infected, the follow-up program is targeting heterosexual contacts, both sexual partners or bisexual men, intravenous drug users and others at high risk.

Dr. George Rutherford of San Francisco's health department said that only a "small number" of individuals have been contacted thus far and they have been "receptive."

Rutherford said that individuals infected with the AIDS virus will be urged to change their sexual practices, both limiting the number of partners and using safer sexual practices that limit the exchange of body fluids.

Rutherford added that it is important to counsel women exposed to the virus on the dangers of becoming pregnant and transmitting the virus to their fetuses.

A positive AIDS antibody test does not predict whether a person will become ill with AIDS. But positive-testing individuals who appear healthy may transmit the virus to others sexually or through the exchange of body fluids. At present, the prevalence of the virus in the general population appears to be very low, less than l percent, according to Echenberg.