Although President Reagan's cancer treatment was greatly enhanced by studies funded in the past by the National Institutes of Health, his administration over the last six months has battled Congress and the research establishment to cut NIH funding and slash the number of new NIH research grants.

Before then, the president -- while not proposing to cut NIH as severely as food stamps and other domestic programs -- seldom recommended that NIH receive yearly increases sufficient to keep up with inflation and sometimes recommended trims, though usually slight. Congress, on the other hand, fought the administration and pushed funding up so much that total NIH spending has increased substantially.

The administration's funding decisions have evoked roars of protest from medical groups, and some promising programs may not be funded.

"This is the wrong time to cut anything in cancer research," said Dr. Frank Rauscher, senior vice president for research of the American Cancer Society. "We're in the golden age of cancer research."

Rauscher, a former director of the National Cancer Institute, said several of the techniques used in treating Reagan were developed or improved by past NCI grants.

These include some of the uses of the CAT scan, hemoccult test evaluations of stool for signs of possible malignancy, the so-called CEA blood test, which tests the blood for signs of possible cancer, and general knowledge of the best treatment at each stage of cancer.

In addition, the NCI's chief of surgery, Dr. Steven Rosenberg, was a member of the team that operated on the president.

For fiscal 1981, before Reagan came to office, Congress had voted $3.5 billion for NIH, including the cancer institute. According to tables published by the House Appropriations Committee, Reagan sought a cut to $3.2 billion for 1982. Congress refused and voted $3.56 billion instead.

For 1983, Reagan asked a small increase, to $3.66 billion. Again, Congress boosted the amount, to $3.93 billion.

The president came back with a request for $3.98 billion for fiscal 1984, but Congress increased that all the way to $4.37 billion.

For the cancer institute, the president in four of the last five years has asked less than Congress provided the previous year, but Congress has repeatedly upped the figure.

NIH, through grants, contracts and in-house research, funds most of the biomedical research in the United States. The academic and professional research community, arguing that spectacular breakthroughs are made possible through increased research, was not happy with the small cuts or small increases proposed by Reagan, but the real conflict came over the funding for 1985.

For fiscal '85, the administration proposed $4.5 billion for NIH and 5,000 new and competing grants to research groups. But Congress, citing biomedical experts who said the money would help take advantage of recent advances, provided $5.15 billion for NIH. Congress also directed NIH to fund 6,500 new and competing grants, a big increase over the 5,493 provided in fiscal 1984, and topping the 5,944 set in 1979.

But the administration, citing financial pressures, came back early this year with plans to fund only 5,000 of the 6,500 fiscal '85 grants. Moreover, it said that new and competing grants for fiscal 1986 should be held to the 5,000 level as well, and that funds for fiscal 1986 should be held to $4.85 billion -- a substantial decrease below what was voted for 1985.

The plan met with strong objections from medical groups, about 150 of which united four years ago to form the Ad Hoc Group for Medical Research Funding, and from research advocates in Congress and others who had helped legislate the 6,500 number. Protests came from Sen. Lowell P. Weicker Jr. (R-Conn.) and Reps. Henry A. Waxman (D-Calif.) and William H. Natcher (D-Ky.), the chairman of the House subcommittee with jurisdiction over NIH funds.

Tom Kennedy of the Association of American Medical Colleges, a member of the coalition, said the increase to 6,500 is justified. "From where we sit, there is a huge amount of extremely promising, extremely exciting science, a large group of very well-trained people out there who could use the funds to do good things for the health of the American people," he said.

Rauscher said only about 28 percent of the cancer research grant applications that have been rated worthwhile and approved for possible funding will actually be funded if the administration limits go into effect.

A decade ago, 61 percent of all scientifically approved grants for all of NIH were funded; today there are far more scientifically meritorious applications, reflecting the advance of science.

NCI, which got money for 977 new and competing grants in 1984, would get 1,030 under a limit of 6,500. But if NIH received a 5,000 ceiling, NCI's grants would have to drop to 790.

The conflict over the grant level is unresolved, but Weicker, in negotiations with the administration, has persuaded it to agree to 6,000 annually for 1985 and 1986.

Because of the dispute, some projects that many consider highly promising may not be funded. For example, Tufts medical school professor Sheldon Wolff said recently that, at one of the national institutes, 33 grants on immune mechanism and allergic responses are in danger as well as 25 on ways to cure and combat sexually transmitted diseases.

Also endangered, among others, are two studies monitoring persons exposed to the drug DES (diethylstilbestrol), which has been found to cause an increased risk of breast cancer in women who took it while pregnant. It was once thought to prevent miscarriages.

Dr. Arthur E. Herbst at the University of Chicago, who has kept track of women who took DES in the early 1950s during pregnancy and has found cancer and other side effects in their children, said it looks like his study is "on hold.