Carter administration officials, blocked by a Soviet veto in their bid for United Nations sactions against Iran, said yesterday that efforts to free the American hostages there could drag on for weeks or even months.

That, administration sources said privately, is the reality behind President Carter's statements yesterday condemning the Soviet veto as an offense to "all who honor freedom" and urging other countries to join the United States in putting pressure on Iran.

Underlying Carter's appeal, the sources conceded, is a tacit admission that the United States has run through the list of peaceful measures it can bring to bear on the crisis and must resign itself, at least for the time being, to waiting and hoping that Iranian authorities will tire of paying "the high price" of holding the hostages.

As they have done frequently throughout the 71-day crisis, the sources insisted that U.S. patience is "not infinite" and could give way at some point to a naval blockade of Iran or other military action. But, they added, while military responses remain "a live option," there is no plan to apply them now.

They said the president is reluctant to escalate the confrontation now because of fears that military moves might put the hostages' lives in danger and because of the complications that have been injected by the Soviet invasion of Afghanistan.

Specifically, the officials said, the Soviet Union has been put on the defensive diplomatically in its relations with nonaligned countries generally and the Islamic world in particular as the result of its intervention in Afghanistan.

That situation is regarded as a strong plus by administration strategists trying to formulate plans for countering Soviet moves in the region. The officials said a U.S. military move against Iran, an Islamic neighbor of Afghanistan, could divert toward the United States, the anger and fear now being directed at Moscow.

The administration's determination to keep diplomatic pressure on the Soviet's was underscored by Carter's remarks, made yesterday in a meeting with scientists, and by a White House statement on the Soviet veto Sunday of the U.N. Security Council resolution on sanctions against Iran.

Calling the veto "an act of political cynicism," the statement said it "exposes, for all the people of the world to see, the Soviet Union's disregard for international law and the world's machinery of peace. It offends the conscience of all who honor freedom and who seek to strengthen the grip of law over lawlessness, of peace over strife -- in this crisis and for the future."

The statement also sought to establish a link with the Afghanistan invasion by suggesting that, the Soviet actions there pose a threat to Iran. It said, "the (Iranian) terrorists holding the American hostages cannot, take comfort from this veto because in reality it is aimed at advancing Soviet designs in Iran."

That, in turn, was described by administration officials as a continuing part of the U.S. campaign, launched last week, to drive a wedge between the militants holding the hostages in the U.S. Embassy compound in Tehran, the Iranian people and the revolutionary government controlled by the Ayatollah Ruhollah Khomeini.

U.S. officials have been stressing the argument that the militants are not students, as they claim to be, but "Marxist terrorists" who may be beyond even Khomeini's control and who are pursuing goals imcompatible with the interests of Iranians.

That strategy has been described in part as an attempt to prepare the American public for a long war of nerves with Iran and to try to immunize the public from impatience and possible demand by Carter's political rivals for more precipitate U.S. action.

In addition, U.S. officials said, the rhetorical campaign is intended to remind the Iranian people and governmental authorities that the confrontation over the hostages means continued economic hardship and disruption in the day-to-day- ofe of their country.

In seeking U.N. sanctions the United States had hoped to increase Iran's economic problems and reinforce to its people their isolation from the world community.

The aim, U.S. officials said, was to make life so uncomfortable for the mass of Iranians that their increasing discontent would force Khomeini to heed the more moderate elements in the Tehran government, who are thought to be seeking an end to governmental support of the militants and a resolution of the crisis.

With the hope of U.N. sanctions dashed by the Soviet veto, administration officials reemphasized yesterday their determination to mount an unofficial trade and credit squeeze against Iran in cooperation with America's major allies among the western industrial powers.

Tentative agreement for such cooperation was obtained by Secretary of State Cyrus R. Vance during a visit to Western Europe last month. At the time, though, the allies stressed that it would be easier for them to take the requested steps if they were able to operate from the mandate of a Security Council resolution decreeing sanctions.

Without the resolution, some European governments -- among them Britain and West Germany -- may be restricted to some degree by their national laws from pressuring their banks and exporting firms not to deal with Iran.

However, U.S. officials said, Deputy Secretary of State Warren M. Christopher and Undersecretary for Economic Affairs Richard N. Cooper, who are in Europe, are conferring with allied governments to remind them of their promises of support and to try to untangle any problems they may face in taking economic measures against Iran.

At his regular briefing yesterday, White House press secretary Jody Powell elaborated on several themes contained in the White House statement condemning the Soviet veto.

Powell said that the direct target of unilateral U.S. sanctions would be to shut off commerce between private American companies still doing business with private interests in Iran. He said those transactions were not directly affected by earlier administration attempts to exert economic pressure on Iran, but that it is unclear how much such private commerce is still going on between the two countries.

Powell said that even with new sanctions it remains U.S. policy not to cut off food and medical supplies from Iran although it is unclear how much food or medicine from the United States, if any is reaching Iran.

Powell also confirmed that the White House is at work on a major foreign policy address by the president laying out the long-term implications for Soviet-American relations in the wake of the Afghanistan invasion. He said the "time and format" of the speech have not been decided, but that the State of the Union address, scheduled for Jan. 23, is a "possibility."