Pakistan President Mohammed Zia ul-Haq, confronted with continuing strong anti-American sentiments within the Moslem population he tenuously governs, says he may turn down the U.S. arms shipments that the Carter administration is suddenly pressing on him.

Zia has transmitted this unexpected reluctance to Pakistani editors and foreign visitors in recent days, despite the fact that Pakistan's worst fear, arrival of Soviet troops at the Khyber Pass, came true last week.

Resuming arms shipments to Pakistan after a nine-month cutoff is one of the main responses announced by President Carter yesterday to the Soviet invasion of Afghanistan. Carter wants Pakistan to build up its armed forces and to act as a possible funnel of military supplies to Afghan insurgents striking from bases in Pakistan.

Zia, Pakistan's martial law leader, emphasized his reluctance to accept U.S. arms when he told newspaper editors Thursday. "We have had bitter experiences" with U.S. aid in the past.

He said he wants to know from Washington just what kind of military aid it is considering sending to Pakistan and on what terms.

According to sources here, Zia has told associates that a limited amount of U.S. aid is meaningless, and that Pakistan has another option -- China, which already supplies it with military hardware, including trucks and artillery.

Zia's alternative fits with his domestic needs and with a Pakistan-China effort against Soviet expansionism on the Indian subcontinent. U.S. Defense Secretary Harold Brown currently is visiting Peking, where part of his talks with Chinese leaders will focus on Soviet moves into Afghanistan.

U.S. arms for Pakistan and the formation of a Pakistan-China alliance, however, could pose a further threat to the stability of this already unsettled region by arousing fears here in India that two of its neighbors may turn against it. Indira Gandhi, who is favored to be India's next prime minister, said today, "I see war creeping closer to us."

Fears in Islamabad center on a Soviet move to stir up trouble in the tribal areas of Baluchistan and the North-West Frontier, where residents are fighting for more autonomy from the Punjabi-dominated central government.

This view underscores the fragility of Zia's Army-run government, which hestitated last November to send troops against rampaging students who destroyed the U.S. Embassy in Islamabad -- an incident in which two Americans died -- for fear that a clash would erupt into antigovernment riots.

At the same time, Islamabad has been courting Iran an recent months and its revolutionary leader Ayatollah hero among Pakistan's largely Islamic population.

In order to preserve this relationship with revolutionary Iran, Pakistan is unlikely to request arms aid from the United States but instead will wait for offer, diplomatic sources in Islamabad reported.

"Pakistan must accept the offer of military aid from the United States despite its wholehearted identity with Iran," said the government-owned Pakistan Times in a New Year's Day editorial.

"Pakistan is very, very proud," said a Western diplomat in Islamabad. "They're waiting for America to come in with an offer. They know the U.S. knows Pakistan's needs."

According to knowledgeable sources here and in Islamabad, Pakistan needs replacement aircraft for its Korean War-vintage F86s; artillery; communications equipment, and either more and better tanks or sophisticated antitank weapons to allow it to defend itself against a tank attack.

But Pakistan military men would also like some of the most sophisticated weapons in American's arsenal, including jet attack planes that will not be fully supplied to the U.S. Air Force until the mid-1980s.

One problem is that Pakistan, which already has about $100 million worth of U.S. military hardware in the pipeline, cannot afford to buy the sophisticated weapons it needs and wants.

Instead, it would like the United States to either give it the weapons or to arrange for favorable credit terms.

Pakistan feels the United States owes it this. It considers itself one of America's oldest allies in the Cold War, a bulwark against communism and a counterweight to the more pro-Soviet stance of India. It helped arrange President Nixon's historic opening to China.

Yet Pakistan officials insist they have been badly served by America. Twice, Pakistani officials say, the United States failed to support it while the country was fighting with India.

Moreover in the period of the 1960s when Pakistan had almost unlimited credit to buy arms in the United States, it piled up a major debt. Now that it has to pay that back, it would like U.S. help to reschedule its debt. Not, only has the United States refused to give this help, but Pakistan believes that Washington has lobbied with other creditors -- including the International Monetary Fund -- to keep them from rescheduling debts.

For the United States to give any aid to Pakistan now is a complete turnabout, and may mean the end of America's nuclear nonproliferation policy.

As a result of Pakistan's clandestine nuclear-weapons program, the United States cut off all aid in April. Starting it would signal to the rest of the world that the United States is not serious about its nonproliferation policy.

In an effort to mollify India, there were reports here that President Carter plans to release two shipments of enriched uranium for this country's atomic reactor at Tarapur. This move has been under consideration for months, but reaction stemming from the Soviet move into Afghanistan pushed it to the forefront.

While Indian officials said they welcome the fuel shipments, they insisted there should be no linkage between it and arms to Pakistan.

"The U.S. is just doing the right thing," said a Ministry of External Affairs spokesman.

Predictably, India has taken a strong position against U.S. arms sales to Pakistan on the grounds that the weapons may be used against it. It took five days for India to react to the Soviet invasion of nearby Afghanistan, and even then its comments were tied to its strong opposition to U.S. arms sales to Pakistan.

"Pakistani arms may be used against India, because the situation within Pakistan is so unstable." Gandhi said today.