LONDON, SEPT. 22 -- Prime Minister Margaret Thatcher voiced strong support today for last night's U.S. attack against an Iranian vessel said to have been laying mines in the Persian Gulf, saying that the defense of merchant vessels is "what we are there to do."

"Look, let's get things straight," she told reporters who asked whether she thought the American action would lead to an escalation of the gulf conflict, "if that ship was laying mines in an attack on innocent merchantmen . . . the merchantmen are entitled to expect the navies of the world to defend them."

"Go for the people who are causing the trouble in the first place," Thatcher said. "There is nothing wrong in defending merchantmen. That is what we are there to do."

Responding to a separate incident in the gulf last night, Thatcher called an Iranian attack on a British-flagged tanker "absolutely outrageous." She told reporters covering her on a tour of the British Midlands this morning that the United Nations ought to "go immediately to an arms embargo" against either side in the gulf war that will not accept a cease-fire.

Iranian charge d'affairs Akhunzadeh Basti was summoned to the Foreign Office for what a British spokesman called a "vigorous protest" of the attack. The Swedish Embassy in Tehran, which handles Britain's interests there, was asked to protest "at the highest level," and to demand an explanation and an apology.

In New York, Foreign Secretary Geoffrey Howe boycotted the General Assembly speech of Iranian President Ali Khamenei, saying that it was "intolerable to sit . . . listening to a government whose vessel has just attacked a British-flagged ship."

But there was no indication that Britain planned to respond to either incident by expanding the scope or altering the mission of its own limited naval presence in the gulf.

"We're still in the business of trying to deescalate tension" in the area, a government official said. There had been no U.S. request for assistance in clearing the mines laid by the Iranian boat, he said.

Four British mine hunters arrived in the gulf during the weekend and began sweeping the waters of the Gulf of Oman, outside the Strait of Hormuz. Like the Armilla patrol, Britain's three-ship naval escort service for British-flagged vessels in the area, the mine hunters are restricted to operations south of Bahrain, midway up the gulf.

Both the Iranian attack on the British-flagged tanker Gentle Breeze, and the U.S. attack on the Iranian vessel occurred in the far northern gulf.

"Of course, we always keep the Armilla patrol under review," Thatcher said. "But I do not think we could spare many more ships, indeed if any."

Noting that "no single navy can protect the entire gulf," Thatcher said that the "several navies" in the area, while not operating under a single joint command, were coordinating their efforts, "and I think that is what they will increasingly do."

Government officials said the Gentle Breeze had been hit by 14 rockets, fired from an Iranian patrol boat. One Filipino crewmember was killed and 33 were reported slightly injured. A fire in the crew quarters was said to have been extinguished early this morning, and the ballast-loaded vessel was being towed to Bahrain for repairs.

There were no Britons aboard the ship, a 103,000-ton tanker registered in the British crown colony of Hong Kong under the red ensign of the British merchant fleet. Sources here said that the Gentle Breeze had neither asked for, nor received, any naval escort when it passed through the Armilla patrol's operational area on its way to pick up a cargo from Kuwait.

In any case, one defense source said, all British-flagged vessels had been told they "must understand the risk" of operating in the gulf, and make their own decisions as to whether to venture into its waters.

The Merchant Navy officers union said it would step up its efforts to enlist a United Nations force to replace British and American escort ships in the gulf.

A spokesman for the National Union of Seamen, which has been critical of both the American and British military presence there, expressed "total horror" at the incident. "We think this entire escalation in the conflict can be laid at President Reagan's door," he said.

Gerald Kaufman, foreign affairs spokesman for the opposition Labor Party, called on the government to "take steps to stop the Iranians playing the cat-and-mouse game that they are with the United Nations."