NEW DELHI, DEC. 3 -- A U.S. Senate committee's action that would link aid to India and Pakistan to their nuclear programs is threatening to disrupt efforts by the Reagan administration to expand military cooperation and diminish Soviet influence with Prime Minister Rajiv Gandhi's government.

The Senate Appropriations Committee approved today a change in the basis for tying U.S. foreign aid to a country's position on developing nuclear weapons.

In a formulation meant to apply directly to South Asia, it said that the United States cannot give aid or sell high-technology items to a country that produces weapons-grade enriched uranium or separates plutonium in unsafeguarded facilities.

Indian diplomats and analysts here characterize the Senate action as a maneuver to justify continuing aid to Pakistan despite Islamabad's apparent contravention of U.S. laws aimed at preventing nuclear proliferation. The Indians say they are treating the Reagan administration's position on the issue as a litmus test of Washington's intentions.

"We are playing it cool for the moment but the administration is going to have to make up its mind," a senior Indian diplomat said today. "There is an improved {U.S.-Indian} climate, definitely, and the administration will have to decide whether to let it continue or let it fall by the wayside.

"If a Senate committee feels it wants or needs to aid Pakistan, let it do so . . . . It will only confirm to Pakistan that they can steal {nuclear technology} and the United States will just look the other way. That is the U.S. business, but don't drag India into it."

Under the committee's version of the aid bill, the president could waive the nuclear restriction if he found a waiver to be in the national interest or if he determined that a country was producing weapons-grade material in response to another country doing the same.

India produces separated plutonium in unsafeguarded plants that its scientists have developed over the past two decades. Pakistan is widely believed to be enriching uranium to weapons grade in plants developed in recent years -- utilizing materials many suspect it has collected through an espionage operation.

A Pakistani-born Canadian national, Arshad Pervez, was charged in Philadelphia in August with bribery and fraud for allegedly seeking to export to Pakistan materials for manufacture of nuclear weapons. Pakistani officials deny that they enrich their uranium to weapons grade or steal nuclear technology.

Under current laws, it is widely believed that the president and the Congress would have difficulty in approving a new five-year, $4 billion aid program for Pakistan. U.S. aid to the country is suspended until Jan. 15 because of fears that Pakistan is developing nuclear weapons.

India gets about $50 million annually in U.S. aid, but it receives far larger amounts of money through multilateral lending agencies. The United States would be bound to oppose that aid as well under the new legislation.

According to analysts here, the Senate action would ignore past Pakistani actions and open the way to continue the aid relationship. Senators have said their action is intended to preserve Pakistani cooperation in supporting the guerrilla war against Soviet forces in Afghanistan.

Some in the Senate have disputed linking aid to the Afghan war, noting that Pakistan has its own reasons to get Soviet troops out of its neighbor's territory. It is an uneasy host to 3 million Afghan refugees.

Although both India and Pakistan could continue to receive aid through waivers under the new formulation, the lumping of the two nuclear programs into one category is likely to set off a political firestorm here -- affecting cooperative programs with India.

Gandhi, who visited Washington a few weeks ago, recently decided to purchase American supercomputers and defense items, nourishing a U.S.-Indian military link. India's armed forces, the world's fourth largest, depend heavily on the Soviet Union but Gandhi has been looking to the West for more sophisticated equipment.

India and Pakistan have fought three wars, and Pakistan's defenses are against India. But New Delhi also considers a potential Chinese threat in assessing its defense needs. China mauled Indian forces in a 1962 war over their border, much of which remains disputed.

"On nuclear policy, we are not guided by regional considerations," an Indian diplomat said, referring to New Delhi's longstanding opposition to signing the nuclear Non-Proliferation Treaty, which would open its nuclear facilities to inspection.

"We have the proven capability {to build nuclear weapons} but no one accuses us of gearing our program toward weapons production," the official said.

This assessment generally is shared by specialists in the region, who say that India undoubtedly has pursued research on weapons-related programs since it exploded a nuclear device in 1974, but with no signs of actually developing arms.

While these analysts say India has been stockpiling plutonium, they relate this to its development of a fast-breeder reactor program for nuclear power that would use plutonium.

They also say that under the Senate committee's bill, India would be penalized for working for two decades to develop a nuclear energy program that may or may not have military overtones, while Pakistan would be rewarded for pursuing a program that it says is for civilian power but that has been widely judged by U.S. intelligence agencies and others as having military uses.