Mexico's decision to bar the return of the deposed shah of Iran, along with several other adverse developments, dealt a blow yesterday to the Carter administration's hopes for a break soon in the Iranian stalemate.

The former monarch, Mohammad Reza Pahlavi, made clear in a statement by his spokesman that he still intends to leave the United States and that he has asked the administration for assistance in doing so.

Washington officials did not hide their disappointment that the one seemingly certain aspect of the game plan for dealing with the crisis -- the early departure of the shah for Mexico -- was undone Thursday night without warning by the Mexican government.

The first U.S. reaction to the surprise development, reported through diplomatic channels several hours before it was made public, was to contact the Mexican authorities in hopes that the shift in views either was not definite or could be reversed. The Mexican government was known to be split on the question of receiving the shah.

Once the State Department learned that Mexico's reversal was definite and binding, U.S. officials were forced to turn to the problem of a new haven for him.

Egypt's President Anwar Sadat has made it clear that he is ready to welcome the shah, but a number of Washington policymakers fear that Pahlavi's arrival there could court internal strife in another strategic Islamic country allied with the United States.Congressional figures close to Israel have made known their apprehension in this regard.

Although officials are tight-lipped about the sensitive problem, there were strong indications that the United States is actively looking for a new haven for the shah. The primary responsibility of his movements, according to State Department sources, rests now, as in the past, on the former monarch and his well-placed friends.

It is unclear what effect the shah's departure from the United States would have on the Iranian militants who are holding 50 American hostage or on the Islamic leadership of Ayatollah Ruhollah Kkhomeini.

The original justification for holding the Americans was to force the extradition of the shah from the United States, a demand that has been repeated by the new Iranian foreign minister, Sadegh Ghotbzadeh.This demand loses its force if the shah is no longer here.

Administration officials said they have not been able to confirm news reports that some of the hostages have been moved out of the American Embassy compound in Tehran, possibly in preparation for being placed on trial.

Concern about this possibility, as well as continuing worry about the treatment of the Americans, prompted a demand from State Department spokesman Hodding Carter that the Iranian government at least "observe the minimal decencies" for the handling of prisoners by permitting independent outsiders to check on the condition of each hostage.

Access to the hostages has been limited to a handful of diplomats and Rep. George V. Hansen (R-Idaho). Only a group of four ambassadors admitted Nov. 10 has seen all or nearly all the hostages.

The only favorable development of the day was the remark of Iranian Foreign Minister Ghotbzadeh, at a news conference, that U.S. acting ambassador L. Bruce Laingen and two aides who have been held in the Foreign Ministry are free to leave Iran.

Secretary of State Cyrus R. Vance said the United States had asked for a "clarification" of the statement, and if the three Americans "can have safe access to the airport, then we would expect them to come home."

Ghotbzadeh said he believed Laingen preferred to remain in Tehran, and added that it would be difficult to provide protection for the American diplomats if they decided to leave the ministry.

Ghotbzadeh's announcement that Iran will not attend the deliberations of the United Nations Security Concil scheduled to begin tonight was another setback to U.S. hopes. The participation that had been promised by the former foreign minister, Abol Hassan Bani-Sadr, and that may have been the cause of his dismissal, had been welcomed here as a sign that Iran was willing at last to engage in an international diplomatic process.

Washington officialdom also had hoped that the presence of a ranking Iranian in New York would present an opportunity for private negotiations, either directly or through U.N. officials.

The United States still is hoping for a strong statement from the Security Council that Iran should abide by international law and practice and release the diplomatic personel.

Washington officials concede there are differences at the United Nations over the tactics to be followed by the Security Council, and nonofficial sources said some Islamic and Third World countries are leery of an open U.N. confrontaton with Iran.

A setback to Washington's hopes for early action on still another front was the announcement that the International Court of Justice at The Hague has scheduled its first hearing on the Iranian issue for Dec. 10, rather than next week, as officials here had hoped.

The United States filed suit at the world court Thursday, asking for a legal order,that Iran release the hostages and clear unauthorized persons from the U.S. Embassy compound.

Taking the hostage issue to the Security Council and the world court is part of the strategy for increasing international pressure on Iran and displaying to everyone that the United States is exhausting all its peaceful remedies before contemplating military action.

An Associated Press-NBC News poll, one of the first extensive tests of public sentiment to be released, reported yesterday that Americans are outraged by the taking of their countrymen as hostages but are not eager for military retribution. According to the poll of 1,381 people nationwide:

If the hostages are harmed or put on trial, two-thirds of those who have heard about the crisis would support a U.S. military attack on Iran.

On the other hand, only 14 percent would back a U.S. retaliatory strike against Iran -- and 79 percent would oppose it -- if the hostages are released unharmed.

By almost 3 to 1, the respondents agreed that the United States should not return the shah to Iran in exchange for the hostages.

Seven out of 10 said President Carter is doing all he can to obtain the hostages' freedom.

The deposed shah remained in a New York City hospital last night, reportedly in better physical condition than in the immediate past. The tube in his side has been removed, and informed sources said he has had no adverse effects from the removal of a gallstone from his bile duct Monday.

A statement issued through a spokesman said the shah was "extremely hopeful that his departure would be of assistance to the president's continuing efforts to end the tragic situation which exists in Tehran today."

The shah's entourage was told by Mexican officials Thrusday afternoon that he would not be welcome to return to that country. The State Department also learned of the news, and began checking to determine if the decision was final. Conclusive word had not been received before the Mexican announcement.

Mexico also informed several prominent Americans interested in the case, including former secretary of state Henry A. Kissinger. Kissinger then telephoned his successor, Vance. Neither would comment on the substance of the conversation.