President Carter declared in remarks made public yesterday that he will not allow the crisis in Iran to be "dragged out" indefinitely or permit public attention to be diverted from the 50 American hostages in Tehran.

Voicing some optimism about recent statements from Iranian authorities, the president said he is determined not to allow the takeover of the U.S. Embassy in Tehran to become "a dormant issue" in world opinion or let "the status quo become acceptable."

"I will not permit this incident to become acceptable and to be dragged out," Carter said. "I will do my utmost to prevent that. I don't want that to be interpreted as threatening military action. I will do everything I can to avoid any bloodshed, provided our hostages are not physically harmed."

The administration steadfastly has refused to set any kind of deadline for a resolution of the crisis as it gradually has stepped up diplomatic and economic pressure on Iran. But the president's comments, while setting no deadline and explicitly ruling out military action now, marked his first public suggestion that U.S. patience with the stalemate could run out.

Carter made the comments in an interview with editors of the Gannett newspaper and broadcasting chain. The interview was made public yesterday.

In one of the few recent optimistic assessments of the situation, the president said he has noted "substantial change," generally for the better, in the attitudes of Iranian authorities.

He cited specifically a softening in the threats, made shortly after the embassy takeover, to try the hostages as spies and perhaps execute them. Iranian officials now are threatening to bring the hostages before an international tribunal that will investigate "American crimes" against Iran.

Carter also said he believes Iranian authorities may be losing confidence that they can force the return of their country's deposed ruler, Shah Mohammad Reza Pahlavi, by continuing to hold the hostages.

"I am determined that in this particular incident we will not forget those hostages one day and that we will continue to keep the issue of their illegal incarceration if the forefront of the consciousness not only of America but of the entire world," he said. "There are a series of steps that we can take."

The president did not elaborate on those steps, but decisions on them are expected to be made in the next few days.

Secretary of State Cyrus R. Vance returned to Washington last night after a tour of European capitals to line up the support of U.S. allies for additional measures intended to pressure Iran into freeing the hostages.

On arrival at Andrews Air Force Base, Vance stressed that "no decisions have been taken yet. Decisions will be taken in the next few days." He then went to the White House to meet with Carter.

Among the options the administration is considering is asking the United Nations Security Council to impose economic sanctions against Iran. A decision in favor of the United States by the World Court, which could issue a ruling on the embassy takeover today, would strengthen the U.S. demand for international action against Iran.

Meanwhile, there were reports yesterday that the shah's health may be deteriorating.

Two physicians from New York Hospital-Cornell Medical Center who flew to Texas yesterday morning to examine the shah said his spleen was enlarged but his condition was "not critical."

A spokesman for the former monarch said the doctors had instituted "a nonsurgical course of therapy. They will make further evaluations from time to time."

The shah's enlarged spleen and what other sources called a potentially dangerous lung condition prompted doctors at Wilford Hall Air Force Hospital outside San Antonio to summon Dr. Benjamin Kean and Hibbard Williams, who were on the medical team that treated the shah in New York from Oct. 22 to Dec. 2.

Medical sources said the "rales," or abnormal sounds in the shah's lungs, could be caused by an accumulation of fluids, by pneumonia or by the spread of the shah's cancer.

The shah's attorneys cited a possible worsening in his condition as they tried Thursday to prevent his having to appear to testify in a lawsuit filed by former employes of Bell Helicopter International. The ex-employes say they were fired unjustly after agreeing to start a training center in Iran.

The shah's lawyers said his appearance would "pose an extremely serious threat to his health." Yesterday Texas district Judge Albert White postponed the shah's appearance but ordered his attorneys to submit a report on his health within five days.

A medical source said the shah left New York with "a severe esophagitis" -- inflamation of his esophagus or gullet -- caused by radiation treatment of his neck for lymphoma. The esohagitis, said a source, could easily have led to fluid accumulation, and the fluid could have reached the lungs to cause problems.