President Reagan yesterday appointed a 13-member commission to advise him on combatting AIDS and then went to the National Institutes of Health to dramatize his concern about the spread of the disease.

At NIH Reagan visited briefly with four children suffering from acquired immune deficiency syndrome -- the first time the president has met AIDS patients -- and toured an AIDS laboratory. In remarks introducing his panel, Reagan referred to "the death by AIDS of friends and former associates" whom he did not name and pledged to "one way or another . . . beat this deadly disease."

Reagan's choice of panelists -- among them a conservative Roman Catholic cardinal and an Illinois state legislator who supports widespread mandatory testing -- as well as the group's collective lack of expertise on AIDS was criticized by gay rights groups and some public health officials.

"This administration never ceases to amaze me," said Jeffrey N. Levi, executive director of the National Gay and Lesbian Task Force. "It has managed to put together a panel whose learning curve will be tremendous and who does not bring a unique perspective about this disease beyond that which the medical community has already recommended. Not only that, it contains one of the most virulently homophobic clergymen in the country."

Levi was referring to Cardinal John J. O'Connor of New York, a defender of church doctrine who has opposed explicit AIDS education campaigns that advocate the use of condoms, forbidden Catholic homosexual groups from holding masses in church facilities and lobbied against New York City's gay rights ordinance. But under his leadership, the New York archdiocese has sponsored several hospices and a hospital for AIDS patients.

Archdiocesan spokesman Joseph Zwilling declined to respond to criticism of O'Connor. He read a prepared statement in which O'Connor said he hoped to "find ways to help alleviate the suffering of those who already have this terrible disease as well as contribute to prevention of further spread."

Dr. Paul Volberding, director of AIDS activities at San Francisco General Hospital, which has treated more than 1,000 AIDS patients, expressed concern that the panel lacked either a physician who treats AIDS patients, a scientist engaged in AIDS research or an expert in health-care financing.

"There are some very tough issues and they are starting in a very difficult position," said Volberding. "We can teach them quickly if they are willing to spend the time . . . . I will certainly invite Dr. Mayberry out to San Francisco to visit our clinic," he said referring to W. Eugene Mayberry, an endocrinologist from the Mayo Clinic who was named chairman of the commission last month.

The presidential order creating the commission directs it to advise Reagan on the "medical, legal, ethical, social and economic impact" of AIDS. The panel's first meeting will be held after Labor Day and a preliminary report is due in October.

Both Levi and Volberding applauded the appointment of the panel's only openly gay member, Frank Lilly, a New York City geneticist and former vice president of the Gay Men's Health Crisis, which operates one of the nation's most extensive AIDS support programs. Lilly, who sat next to O'Connor during yesterday's presentation, pledged to "represent the biomedical community as well as the gay community."

"Very clearly there was consideration of my sexual orientation but I have other qualifications," Lilly said. "I hope we're going to be able to accomplish a lot . . . . I wouldn't have taken the job if I didn't think that."

The panel's other controversial member is Rep. Penny Pullen, the Republican leader of the Illinois House, who has sponsored bills that would require testing of hospital patients, marriage license applicants, those convicted of sex or drug offenses and prisoners. The bills passed the legislature and are awaiting action by Gov. James R. Thompson. According to Esther Joo, administrator of the Illinois AIDS Advisory Council, Pullen has also sponsored a bill that would require health officials to collect the names and addresses of infected persons.

"What concerns me is that she's clearly going into this with her mind made up about what to do," said Victor J. Basile, director of the Human Rights Campaign Fund, a Washington-based gay political action committee.

The other panelists are: Colleen Conway-Welch, dean of nursing at Vanderbilt University; John J. Creedon, chief executive officer of Metropolitan Life Insurance Co.; Dr. Theresa L. Crenshaw, a San Diego sex therapist; Richard M. De Vos of Michigan, president of the Amway Corp.; Dr. Burton James Lee III, an oncologist at Memorial Sloan-Kettering Cancer Center in New York City; Dr. Woodrow A. Myers Jr., Indiana's state health commissioner; Dr. Cory SerVaas, editor and publisher of the Saturday Evening Post; Dr. William P. Walsh, cofounder of Project Hope, a hospital ship, and retired admiral James D. Watkins, the former chief of naval operations.

The composition of the panel has been the subject of wrangling since May, when White House domestic policy adviser Gary L. Bauer said the administration planned to appoint a group of "distinguished Americans who would reflect the views of ordinary people" to advise Reagan about AIDS, which has struck nearly 39,000 Americans since 1981.

Much of the controversy surrounded the appointment of a member of the gay community, which accounts for 75 percent of AIDS patients. Last month White House spokesman Marlin Fitzwater said the administration would search "far and wide for the best candidates" based on expertise, not sexual preference, in choosing members for the commission.

During a visit yesterday to the laboratory of Dr. Samuel Broder, site of the first work on azidothymidine (AZT), the only federally approved drug for the treatment of AIDS, Reagan peered at slides under a microscope and was briefed by Broder on progress on AIDS research.

The president appeared moved after his visit to the pediatric oncology ward, where he presented four children being treated for AIDS with jars of jellybeans. He also picked up and held a 14-month-old child who contracted AIDS from his addict mother and shook hands with a preschooler who acquired AIDS through a blood transfusion.

"Let me just make a promise to those children and all others who have contracted this disease . . . we'll not rest till we've sent AIDS the way of smallpox and polio," Reagan said.