Tehran expressed defiant confidence today that it could withstand any hardship imposed by economic sanctions sought by the United States to pressure for release of Americans held hostage in the U.S. Embassy here.

"We have already taken precautionary steps," said Finance Minister Abol Hassan Bani-Sadr. We are going to buy what we need from other countries," he added, without specifying what countries.

Bani-Sadr's determination was echoed by the militant Islamic students occupying the embassy and holding the 50 Americans there since Nov. 4.

"We are not afraid of economic sanctions," said a spokesman for the students, reached by telephone inside the embassy. "Our nation can cope with them."

The defiance reflected Iran's national mood of confrontation with the United States over the hostages and demonstrated again the eagerness of Ayatollah Ruhollah Khomeini's followers to portray themselves as unyielding enemies of Washington. At the same time, it paralleled the assessment of Iranian economists that sanctions would have little immediate effect unless food imports were cut off and oil exports were blockaded.

In addition, members of Khomeini's ruling Revolutionary Council are reported confident that the Soviet Union will exercise its veto in the U.N. rSecurity Council to block the Carter administration's request for sanctions. sThere have been no public signs here, however, that Moscow has offered such asurances to the Iranian leadership.

In any case, President Carter's announcement yesterday that he is seeking the U.N.-sponsored sanctions against Iran seemed to have little effect on Iran's resolution to try at least some of the embassy hostages for espionage.

Khomeini, the Islamic revolution's spiritual guide and temporal leader, told a French parliamentary delegation at his headquarters in the holy city Qom today that a trail before an international court definitely will be held.

"Those hostages who were spies will be tried before an international tribunal for the crimes of the American government," he said, according to the official Iranian news agency Pars. "The CIA and SAVAK also will be exposed so the world may know what kind of crimes America committed through the shah."

SAVAK was the deposed shah's secret police. Its abuses, including torture, underlined much of the popular hatred of the shah. Widespread conviction here that it was trained by and linked to the American Central Intelligence Agency also contributes to resentment against the United States.

The walls of the occupied U.S. Embassy, for example, are papered with photographs of "martyrs" including victims of SAVAK, along with young men shot by the Army during the uprising that led to the shah's overthrown almost a year ago.

One of Khomeini's high aides, Ayatollah Hossein Ali Montazeri, chief mullah of Tehran, also expressed determination to carry through with the trial despite the threats of economic sanctions raised by Washington.

"The trial of the hostages is essential and definite," he told a Japanese television interviewer.

The composition of an international tribunal apparently is still under negotiation between the Khomeini government and prospective panel members.

Sean McBride, the former head of Amnesty International and winner of the Nobel and Lenin peace prized, was reported to be flying to Tehran tonight for talks with the Iranian leadership, with the tribunal idea presumably among the subjects he planned to discuss.

Replying to questions about the U.S. sanctions proposal, Bani-Sadr acknowledged that such measures, "will have some effect on the economy."

"It will make prices go up and it will slow down economic activity," he said. "It will also upset dependent industries which rely on imports. But it also has positive effects. It makes people work harder in every field, especially production."

A respected economist at the University of Tehran said sanctions would have only a small immediate effect on the Iranian economy as long as food imports and oil sales continue, as suggested by Washington.

A food embargo, however, would drive up prices steeply and quickly, adding to an inflation rate already estimated at 40 percent, he said.

Iran depends on imports for 20 percent of its wheat, for more than 30 percent of its rice and sugar and for 80 percent of its vegetable oil, according to Moreza Movahedizadeh, managing director of Government Trading Corporation. The United States supplies between 25 to 30 percent of these vital imports, he said.Worldwide refusal to buy Iranian oil would swiftly empty the government coffers, he added, because tax collections have been temporarily halted and oil is the treasury's only current source of income.

But the economist, who asked that his name no be cited, said a lack of heavy machinery or spare parts for Iranian factories would not produce a great effect because most industries have been shut down or run below capacity anyway during more than 15 months of turbulence.

Iranian economists estimate the nation's gross national product has dropped by 50 percent from the 1977 level of $65 billion because of the turmoil.