Federal officials have reported a sharp rise in this country of chancroid, a sexually transmitted disease that has contributed to the rapid spread of AIDS among heterosexuals in Africa.

Health specialists are particularly alarmed by the trend because it coincides with similar increases in syphilis and pencillin-resistant strains of gonorrhea. In all cases, the increases have been concentrated in metropolitan areas among black and Hispanic heterosexuals who are at high risk for AIDS.

"Coming at a time when we are trying to increase the public's understanding of AIDS, the implications of these reports are very grave," said Dr. Willard Cates Jr., director of the division of sexually transmitted diseases at the federal Centers for Disease Control in Atlanta. "The rise of genital ulcer disease has to put a growing number of people at risk for AIDS. But short of a massive increase in funds -- which is not in this budget -- it will be very hard to do much more."

Chancroid is a bacterial infection that causes genital ulcers that make it much easier to absorb and transmit the AIDS virus. It is a common, serious public health threat in Africa, where it is more prevalent than syphilis. Several studies there have demonstrated the connection between chancroid and transmission of the AIDS virus.

Since 1981, the number of chancroid cases reported in the United States has grown by more than 50 percent a year. In 1985, the CDC reported more than 2,000 cases for the first time in 30 years. Last year, the number grew to 3,418 cases, up 65 percent. A report on chancroid appears in today's issue of the Journal of the American Medical Association.

For the first 48 weeks of 1987, reported cases of chancroid are up 42 percent over the same period in 1986, federal officials said.

In addition, syphilis cases rose by 32 percent in the first nine months of 1987 and cases of pencillin-resistant gonorrhea rose 62 percent. In the first three quarters of this year, federal officials said 25,512 cases of syphilis and 17,393 cases of penicillin-resistant gonorrhea were reported to the CDC.

In the United States, the increase of venereal disease has occurred mostly among poor, minority inner-city residents who are hardest to reach with public-education campaigns. In the past year, the number of syphilis cases has more than doubled in New York City and Los Angeles, cities that account for much of the nation's increase.

"Part of the problem is that almost all attention has been shifted from these diseases to AIDS," said Wendy J. Wertheimer, director of public policy for the American Social Health Association. "In the past we have had the resources to battle these outbreaks. But since 1981 we have seen virtually no increase in funding for STD {sexually transmitted disease} control and a loss of people to AIDS research."

The level of funding has remained relatively similar since 1981, although many of the federal health officials working on venereal disease spend a large part of their time on AIDS research.

Health officials said it will be hard to reverse the trends unless more funds are focused on the acutely affected areas.

"It is going to get more and more difficult to talk about AIDS without talking about these other STDs," said H. Hunter Handsfield, director of venereal control programs for the Seattle area. "And to the extent that we are going to see a major heterosexual AIDS epidemic, this group of low-income people is the one we are going to see it in."

Handsfield and other health experts gave several possible reasons for the recent increases. Among them are fewer funds for education and greater mobility among prostitutes and their clients. Federal officials also note an increase in women willing to prostitute themselves for drugs, particularly crack, a potent form of cocaine.

Because chancroid has been a minor problem in the United States until relatively recently, doctors often misdiagnose it.

"Physicians need to know more about this disease," said Dr. George P. Schmid, a CDC researcher and an author of the journal report. "It is often mistaken for syphilis and treated with improper drugs."