President Abol Hassan Bani-Sadr's chief clerical rival today challenged a government plan to return the bodies of eight American servicemen and said Friday's aborted U.S. rescue mission could raise new dangers for the hostages.

Ayatollah Mohammed Beheshti, the head of Iran's Supreme Court and a leading member of the ruling Revolutionary Council, also told a news conference that the rescue attempt increased the possibility of hostage trials for the Americans held by militants Moslem students since Nov. 4.

Beheshti, the spirtual leader of the powerful Islamic Republican Party, said that the issue of returning the remains of the eight Americans who died in the hostage rescue attempt would have to go back to the Revolutionary Council and receive the approval of Iranian leader Ayatollah Ruhollah Khomeini.

"If permission is not given, the return won't happen," Beheshti said.

It was not immediately clear whether Beheshti would be able to block the return, the procedures for which have already been initiated by Bani-Sadr's government.

Asked if Iran would demand money from the United States in return for the bodies -- an editorial in Beheshti's party newspaper had suggested that they be held in Iran until Washington released frozen Iranian assests -- Beheshti further confounded reporters by replying: "The American government tells many of these kinds of lies."

European diplomats feared Beheshti's comments could signal a setback for efforts to repatriate the bodies. One informed diplomat said, "We are playing it by ear."

One of Bani-Sadr's aides said that despite Beheshti's statement, a decision had been made on the repatriation and that a plan was going ahead for Greek Catholic Archbishop Hilarion Capucci to deliver the remains to the International Red Cross in Switzerland for subsequent return to their families in the United States, bypassing the U.S. government.

The militants holding the hostages announced the transfer of two more groups of them from the occupied U.S. Embassy here to the southern Iranian cities of Shiraz and Jahom.

The statement called on the populations of those cities to beware of American plots and help keep the hostages safe "for the day of their trial." It said the hostages were accompanied by a number of militants but gave no details of the captives' places or conditions of detention.

Since the U.S. hostage rescue mission ended in flames on a remote desert air strip in eastern Iran, the militants have now announced the transfers of an unspecified number of hostages to seven cities in different parts of the country. However, none of the transfer has yet been confirmed by any independent sources.

At his news conference, Beheshti said the U.S. rescue attempt "caused new dangers for the hostages." But he insisted that they still were being well treated by the militants.

"A trial was possible before and it's possible now," Beheshti said."But this attack has increased the possibility of a trial.A trial of the hostages is not only to judge their own failures, their own crimes. This trial is before anything a trial of American policy in Iran. In this way the American attack makes the trial more possible."

Beheshti added: "Our purpose in this trial is to make the cruel and criminal policies of the United States clear for people all over the world. The citizens of the United States should know what the American government does with the money and the power that the people give it."

At another point he indicated that the decision on a trial should be made by the Revolutionary Council, which should assign the proceedings to a special court or the Supreme Court.

Archibishop Capucci, who arrived here at the government's invitation early yesterday to handle the transfer of the bodies, today joined Papal Nuncio Annibale Bugnini in blessing the Americans' remains at the Tehran morgue.

In other remarks, Beheshti defended a fellow clergyman, Ayatollah Sadegh Khalkali, for using the U.S. servicemen's charred corpses as props in a denunciation of American policy and President Carter at a new conference inside the occupied U.S. Embassy compound Sunday.

"Mr. Khalkali wanted only to show the Iranian people and men and women all over the world what Mr. Carter has done to Americans with this foolish act," Beheshti said.

Iranian television said tonight that Bani-Sadr had sent letters to U.N. Secretary General Kurt Waldheim, the secretary-general of the Islamic Conference and European Parliament leader Simone Veil inviting them to send representatives to a May 10-12 conference in Tehran to examine evidence of "U.S. crimes" against Iran.

Acting on instructions from Khomeini, Bani-Sadr already has invited the Palestine Liberation Organization and other "national liberation" groups to send delegations.