Health and Human Services Secretary Margaret M. Heckler, discounting the concern expressed here by the nation's mayors, said today that the immune systems disease AIDS has caused "unwarranted panic" and "irrational fears" while affecting only a relatively small group of Americans.

Heckler told the U.S. Conference of Mayors that she is trying to increase her department's $14 million budget for Acquired Immune Deficiency Syndrome research by transferring an additional $12 million from other unspecified health and welfare programs.

But she said no further infusion of federal money is needed to combat the disease, which has struck mainly homosexual men.

Explaining that she wanted "to squash the vicious rumors" about AIDS, Heckler said, "There is a misapprehension that AIDS may be 'breaking out' into the general population . . . . For the overwhelming majority of Americans, there appears to be little or no risk of falling victim to this disease."

Heckler was sent here with Housing and Urban Development Secretary Samuel R. Pierce Jr. and Transportation Secretary Elizabeth Hanford Dole to respond to a steady torrent of criticism of the Reagan administration at the mayors' meeting. The Cabinet members offered conciliatory words but no policy changes.

Pierce told the mayors that "we both seek to replace the despair and unemployment that pervade our most depressed areas with hope and opportunity."

But he said the administration could not meet their demands for more aid because "we must keep tight reins on federal spending."

Heckler refused to talk about health care for the unemployed and other welfare issues raised by the mayors.

When reporters asked what her department was doing about urban hunger, Heckler turned to leave, saying, "I just want you to know that's an Agriculture Department issue and I am working on AIDS today."

Heckler's remarks about AIDS appeared to contradict a conference resolution which says the nation is "on the horizon of a new epidemic that increasingly afflicts the general population."

The problem is "very serious" for such high-risk groups as homosexuals, Haitians and intravenous drug users, Heckler said, but there is no evidence that the disease can spread to others through casual contact. She rejected the call of a mayoral task force for $50 million in new federal spending on AIDS, saying her alternative was still more than the government spent on toxic shock syndrome and Legionnaire's disease over an eight-year period during this and the last decade.

Heckler later declined to say which HHS programs would be cut to fund AIDS research, saying only that she hoped to find the savings from "waste" in the department.

Pierce noted his support for community development block grants and urged the mayors to endorse a White House plan to create 75 urban enterprise zones.

But he rejected the mayors' call for $5 billion to repair highways and bridges, saying, "I don't see where such assistance can be gained."

Pierce did not mention his proposed cutbacks in public housing subsidies or his opposition to renewed federal aid to build low-income housing, which the administration regards as too expensive. The HUD secretary asked support for his version of fair housing legislation, even though the mayors and many civil rights groups are backing a competing bill in the Senate.

Responding to questions about the economy, Pierce said, "We think we're on course and we're going to stay on course. You don't turn this country around by taxing and spending."

On Monday, Dole thanked the mayors for supporting a five-cent gasoline tax increase last fall and noted benefits for cities ranging from $114 million in rail modernization in New York to $12 million for buses in Oakland.

But she said the administration still is determined to eliminate nearly $1 billion in mass transit operating subsidies, which the White House already has cut by 25 percent.

Dole said the transit aid "has been an intrusion which has undermined local initiative." But it is an intrusion that many big-city mayors are pressing Congress to keep.