Premature announcement by the White House that President Reagan would address a joint session of Britain's houses of Parliament during his three-day visit here in June has embarrassed Prime Minister Margaret Thatcher's government and drawn complaints from the opposition Labor Party.

Officials at the prime minister's office at 10 Downing Street said today a formal invitation has not been issued yet for Reagan to speak to the assembled members of the House of Commons and House of Lords in historic Westminister Hall.

"It is just one of the possibilities under consideration," one official said. "Invitation is not necessarily the correct term. Before we can invite, we have to make sure everyone is in agreement about it. We would rather have had things tied up together before this happened."

The U.S. Embassy here today transmitted "an expression of regret about this misunderstanding" to the British Foreign Office.

Thatcher had not consulted with the leadership of Parliament yet about Reagan speaking there. She hastily arranged a meeting today with Labor leader Michael Foot, who told her he opposes it.

Reagan would be the first American president to address the elected members of Commons and the hereditary and appointed Lords in ancient Westminister Hall. The only other foreign head of state to do so was French president Charles de Gaulle in 1960. The two legislative houses normally come together, in the Lords' chamber, only for the state opening of Parliament by the queen.

The news was leaked to the Los Angeles Times during Reagan's vacation in California and discussed by White House aides Michael Deaver and Larry Speakes on Sunday. Questioned by the BBC today, Speakes said from Santa Barbara that Deaver personally made the arrangements with representatives of the queen and the prime minister during a recent trip to London. He said Deaver visited Westiminster Hall and "stood on the spot from which the president will speak."

Pressed by Labor members of Parliament about how this could happen without the approval of the parliamentary leadership, House of Commons speaker George Thomas promised today to look into the matter.

"There are a considerable number of MPs, certainly on this opposition side," Labor's Frank Dobson told the speaker, "who feel that whereas there are a number of distinguished presidents in the past or existing heads of state who might reasonably receive such an invitation, they do not believe there are a substantial number of British people who welcome such an invitation being extended to the present president of the United States."

Gwyneth Dunwoody, a member of Parliament and Labor's executive committee, said it was an "affront" to the British government for the guest rather than the host to be making such an announcement. Some Labor members opposed to the Reagan administration's foreign policy said they would boycott it.

"Here is one MP who will not be listening to President Reagan," said Labor's Martin Flannery. "The president is an utter ignoramus on international politics and has to apologize for every speech he makes."

First built in 1099, Westminster Hall was reconstructed between 1394 and 1402 in its present form with one of the largest and finest hammer-beam timber roofs still to be seen in England. The stone-walled hall has survived fires that destroyed several royal palaces and houses of Parliament built around it before construction of the present neo-Gothic houses of Parliament in the middle of the 19th century.

Although it now stands empty much of the time, Westminster Hall has been used for important state functions since kings first held court there. Thomas More and Guy Fawkes were among those tried for treason in the hall, and Winston Churchill and several monarchs have lain in state there.

"The hall is a very historic part of Westminster and is normally not handed out lightly," said Dunwoody.

Buckingham Palace confirmed today that President and Nancy Reagan will be staying in Windsor Castle the nights of June 7 and 8. But they refused to say whether Reagan, the first American president since Woodrow Wilson to stay in the castle, will ride any of the horses stabled there.

The president's visit to Britain, sandwiched between summit meetings of seven Western leaders on economic policy at Versailles and leaders of the 15 NATO countries in Bonn, is being portrayed by some of the media and government sources here as an opportunity for presidential image-building for audiences in the United States and Europe. Televised scenes of him horseback-riding and hosting a banquet at Windsor, visiting with the queen and speaking in Westminster Hall are seen as part of this effort.