The United Nations Security Council spent last week, "Namibia Week," debating possible sanctions against South Africa for its military occupation of Namibia, which used to be called South West Africa.

Opponents of the South African occupation spent last week, "Namibia Week," in educational seminars here to boost support for sanctions against South Africa.

And U.S. Court of Appeals Judge Malcolm Wilkey spent last week, "Namibia Week," in Namibia -- with his wife, at the invitation and expense, he says, of the South African government.

Wilkey's trip has raised eyebrows among his colleagues, although none apparently believes the trip is illegal or in violation of any judicial canons of ethics.

Any judicial trips paid for by foreign governments or private businesses cause consternation among those who believe judges should be cloistered so as not to be tainted. For example, should a case involving South Africa or Namibia come into the federal courts, Wilkey might have to recuse himself from hearing that case because of the trip.

Sticklers cite ethical canons that advise judges to avoid even the appearance of impropriety or lending their prestige to the private interests of other people or groups. Still, judicial junkets are not uncommon.

But Wilkey's trip troubled some judges and one State Department official precisely because it was to Namibia, a country whose government is not recognized by the United States. The Carter administration held that elections to choose that government, sponsored by the South African government, were illegal. The Reagan administration is conducting a review of the policy.

One State Department official said that had he known about the trip, he would have advised the judge not to go, at least not while the sensitive issue is being reviewed.

Wilkey's secretary refused to say when the judge left for Namibia, or why he went. One source said it was a three-week tour, another said it was for about 10 days.

Carl Shipley, a private attorney and former Harvard Law classmate of Wilkey who now represents Nambibia here, said the invitation came after Wilkey met some Namibian politicans at a social gathering here.

After visiting Nambibia, Wilkey went on to South Africa. There, he told a reporter that he took the trip at the invitation of the division of "interstate relations" of the South African Administrator General's office in Namibia. Wilkey said the purpose of the trip was "to see and understand what's going on in Namibia." He has met with government officials, judges of the courts there, attorneys, leaders of the opposition parties and visited the "operational area" of the war against Namibian guerrillas.

He said the government of Namibia paid their way out and is picking up their expenses there, although the Wilkeys paid for the South African part of their tour.

Wilkey's travels apparently are not the only source of concern to his colleagues. One source at the Court of Appeals said some of the judges there were waiting for Wilkey to return so they could ask him about his recent appointment by President Regan to the Iran-United States Claims Tribunal. The judges on that aplparently overburdened court want to know how much of their colleague's time will be taken up on that commission.