Bank of America, the nation's largest, was accused yesterday by a former top Carter administration official of breaking the understanding on which the hostage-release agreement with Iran was concluded.

At issue is a lawsuit the bank filed Wednesday to protect against loss of some $91 million in interest it paid Tuesday as part of the complex arrangement to free the 52 American hostages. The disputed amount was part of $2.397 billion the bank transferred to the Federal Reserve under an executive order signed Monday by President Carter the day before he left office.

Bank of America, which held more frozen Iranian assets overseas than any other U.S. institution, claims it did not owe the amount of interest the Iranians were demanding.

A spokesman said yesterday that the bank was pressured to make the payment in order not to delay release of the hostages, and did so only under protest.

The bank had some protection under the hostage deal -- its $91 million was part of $130 million put in escrow in London, pending the outcome of further arbitration. For fear that this might not provide enough security, the bank also moved for attachment against Iranian deposits it still holds frozen in its domestic branches.

The former Carter administration official, who asked that he not be identified, said yesterday that "Bank of America's action could throw into jeopardy" the $1.4 billion escrow account established in the Bank of London to pay off additional loans by American banks to Iranian borrowers.

"The bank's legal move was inconsistent with the agreement and inconsistent with understandings on which the American banking deal was concluded," he said.

Bank of America's court action was the first of many major legal attacks expected to be launched against provisions of the agreement.

It comes as the Reagan administration is conducting an in-depth review of all the legal aspects. Spokesmen for the new president have said they intend to honor the Carter-negotiated agreement "consistent with domestic and international law."

Yesterday, the Dallas-based computer software firm Electronic Data Systems Inc. asked a federal judge there for a preliminary injunction to prevent more than $20 million in Iranian assets against which it has a claim from being moved in accordance with the hostage-release agreement.

EDS, founded by Dallas millionaire H. Ross Perot, last year won a $23 million judgment for unpaid debts, relocation costs and lost profits resulting from a dispute with Iran dating back to the collapse of the late shah's government. The Perot firm is the only American company to have both won a judgment in an American court and have attached Iranian funds that could be used to pay it off.

Meanwhile yesterday, for the third time in less than a week and the second time since the Reagan administration took over, Washington protested to Moscow about "scurrilous" charges in the Soviet press regarding the United States and Iran.

State Department spokesman William J. Dyess denounced a Soviet press report that the 52 former hostages are being "brainwashed" by the CIA. Dyess said the charge is untrue and, in a reference to the Americans' 444-day ordeal in Iran, added: "It's possible, by Soviet prison standards, that they don't consider that the 52 were mistreated."

State Department sources said an official protest is being made by the U.S. Embassy in Moscow. A similar protest regarding Soviet media attacks on U.S. policy toward Iran was made by the embassy on Thursday.

The Bank of America spokesman said yesterday that the legal move was undertaken because there is no guarantee that the provisions of the hostage-release agreement for settling the interest dispute will work out.

It calls for each bank and Iran to seek a solution and, if that fails, to go to binding arbitration before an international tribunal to be established under terms of the agreement.

In addition, $130 million of the $1.4 billion escrow -- an amount made up of Bank of America's $91 million and other sums of interest in dispute -- has been set aside to cover this problem.

"The tribunal is ad hoc, unprecedented and untested," the Bank of America spokesman said yesterday. "What we have to do is collateralize our payment out of Iranian funds onshore here to assure we have a refund." He added that the step was being taken so that the bank would be protected in the future from any stockholder suit should it not receive the full $91 million.

The bank already has attachments totaling $405 million covering, for the most part, $337 million in loans outstanding to the government of Iran and other Iranian entities.

The spokesman said yesterday he believed the bank has received repayment of about $100 million of its loans from the Tuesday payment but has yet to reduce the amounts it has covered by court attachments.

"When the time comes to strike the balance, we'll strike the balance," he said.

Another former Carter aide who was involved in the Iranian negotiations said yesterday that he believed the Bank of America suit will not become a pattern for other institutions. Unlike most of the 12 banks involved in the negotiations, the San Francisco-based bank had more Iranian deposits than loans and thus stood to lose more than the others.

"They have breached the agreement," he said. But he added that he believed the court action would fail when the Reagan administration eventually moves to have it and other attachments dismissed under terms of the agreement.