The British government today told Britain's highest court that the United States was treading on Britain's sovereignty when it took actions to compel testimony by British citizens in a U.S. court proceeding.

In a presentation to the "Law Lords." Samuel Silkin, Britain's Attorney General, sided with seven officials of Rio Tinto-Zinc Corp., a major uranium producer, who are fighting to overturn a court of appeals ruling ordering them to give oral testimony for use in a current Richmond, Va., trial pitting major utilities against Westinghouse Electric Corp.

Silkin contended that the circumstances surrounding U.S. involvement in the case - a case between private parties-raised questions of comity between the two nations and smacked of "excessive sovereignty." The action was one of a "foreign government entering into our sovereignty." he said after the hearing. He said it was much like "an armed force" that might invade Britain's shores.

Westinghouse, on trial for backing out of long-term uranium supply contracts with major utilities, has been seeking information from the RTZ officials that might bolster its defense in the Richmond case.

Citing a section of the Uniform Commercial Code. Westinghouse in September 1975 told 27 utilities it was excused from fulfilling the contracts because unforeseen events had made them "commercially impracticable."

Westinghouse has argued that the activities of a worldwide uranium cartel was one of the factors forcing the market price of uranium up to $26 a pound at the time it announced it could no longer fulfill its contracts. The contracts all called for uranium to be supplied to the utilities to fuel their nuclear plants at prices between $8 and $12 a pound. (The price is now more than $40 a pound.)

The officials of RTZ, which was a member of the cartel, were called on to give testimony here last summer under the terms of a convention, which the U.S. and the U.K. have both signed, allowing testimony to be taken from citizens of other countries in civil proceedings.

When the hearing opened, however, the officials took the Fifth Amendment on grounds that any information they might give could be used to indict them. A grand jury in Washington was already investigating possible violations of U.S. antitrust laws by the cartel.

Then, the U.S. government granted the RTZ officials immunity from criminal prosecution, eliminating their need to invoke the fifth. Although the government rarely grants immunity in civil cases, Justice Department officials, including Attorney General Griffin B. Bell, cited "extraordinary circumstances" and said the grant was in the public interest.

U.S. officials readily acknowledged that the government was having difficulty securing information for its grand jury investigation and that it was unlikely to learn what the RTZ officials had to say any other way.

Silkin fastened on that aspect of the controversy in his presentation to the Lords today.

The U.S. "intervention" in granting immunity transformed the nature of the original request by a U.S. court for the assistance of the British courts in a civil proceeding into something different, he suggested, thus rendering illegal the orders compelling the British citizens to testify.

The U.S. action violated the rules of comity, the friendly and courteous recognition as far as practicable by one country of the other's laws, he said. The U.S. had used for one purpose something designed for a totally different purpose, he suggested.

"The U.S. Department of Justice ceased merely to keep their eyes and cars open for any information about the activities of the cartel." Silkin said, "Instead, they took positive steps to secure evidence for their grand jury investigation."

He contended that the government didn't say the public interest required that as much information as possible be made available in the Virginia case. Its "only" purpose was to obtain information for the grand jury, which would not come under the conventiot, he argued.

Silkin noted that the British government has protested the U.S. action and decided to intervene in this case only after " fruitless" diplomatic communications.

Although the Lords agreed to hear Silkin, they reserved judgement on whether they could, should or would take the government's views into account in considering questions about this litigation involving two private parties.

The case is being argued against a backdrop of increasing concern here about American persistance in what is viewed as unreasonable attempts to apply U.S. antitrust laws outside its national boundaries. Under U.S. law, if the U.S., its companies or citizens are affected by the actions of foreign nationals or firms, the U.S. has a right to pursue the issue. Thus, if the cartel's actions were found to have forced the cost of uranium up in the U.S. or made it difficult for Westinghouse to secure supplies, it is considered within the bounds of U.S. antitrust laws. This, however, is not a view to which foreign countries generally subscribe.

Silkin will continue his presentation Monday morning, after which counsel for Westinghouse will put on its case.