LONDON (AP) _ Soviet leader Mikhail S. Gorbachev insisted during a rare formal meeting with the British ambassador that arms control agreements tentatively reached at the Reykjavik summit must be regarded as a package, diplomatic sources said Tuesday.

Gorbachev specifically said there must be a link between restraints on the U.S. ''Star Wars'' program and an agreement to eliminate medium-range nuclear weapons in Europe, said the sources who spoke on condition they not be identified.

Gorbachev received British Ambassador Sir Bryan Cartledge in the Kremlin for 90 minutes on Monday. It was the first time a British ambassador formally called on a Soviet Communist Party general secretary since Humphrey Trevelyan met Nikita Khrushchev 23 years ago.

Cartledge's call was to deliver a response to a verbal message Gorbachev sent to Prime Minister Margaret Thatcher just before she met President Reagan at Camp David in mid-November. Gorbachev's message dealt with arms control and East-West relations.

The diplomatic sources said Mrs. Thatcher responded that European leaders want a Soviet-U.S. understanding, and that they have full confidence in the United States and its record of consultation within its NATO allies.

Mrs. Thatcher also detailed the results of her agreement with Reagan on how to pursue an arms control agreement following the Oct. 11-12 Reykjavik summit.

That agreement makes elimination of medium-range nuclear weapons in Europe a priority, calls for a 50 percent cut in superpower strategic weapons over five years and a worldwide ban on chemical weapons.

The summit foundered on disagreements over Star Wars, the research program for a space-based defense system formally known as the Strategic Defense Initiative.

Diplomatic sources said Mrs. Thatcher also said there was a need for improved confidence between East and West through withdrawal of Soviet troops from Afghanistan and granting of basic human rights.

Gorbachev, during what was described as ''an open, lively exchange'' with Cartledge, interrupted the ambassador several times, and made two main points, the sources said.

The Soviet Communist Party chief declared that the Reykjavik summit had created a new situation. The sources reported that Gorbachev said if an attempt was made to separate one of the components, such as the medium-range missile element, the other parts of the package would have to be looked at again and the situation would revert to what it was before the summit.

The sources said Gorbachev delivered a lengthy dissertation on the importance he held for his dialogue with Mrs. Thatcher and the timeliness of her planned visit to Moscow next spring.

Gorbachev stressed the regard he has for Mrs. Thatcher as an interlocutor on East-West relations and as someone with influence within the NATO alliance, the sources said. No dates for Mrs. Thathcer's visit have been announced.