South Africa's defenders against economic boycott - the United States, Canada, Britain, France and West Germany - warned Pretoria yesterday that their patience, and perhaps their support, is running out.

The five Western powers that have sought for a year and a half to help arrange a peaceful independence for South African-controlled Namibia abstained in the U.N. Security Council as a resolution threatening future economic sanctions passed 10 to 0.

Ambassador William H. Barton of Canada, however, told the Council on behalf of the five nations: "It would be a mistake to interpret our abstention as a lack of sympathy of the resolution or the direction in which it points the Council in the events South Africa fails (to comply.)"

The United States and Western European nations in the past have vetoed black African-led efforts to impose U.N. economic sanctions on South Africa, which is an important trading partner with about $25 billion in American and European investments.

The resolution asks U.N. Secretary General Kurt Waldheim to report by Nov. 25 on South Africa's willingness to cancel the internal elections it has scheduled for Namibia on Dec. 4 and to allow preparations to begin for U.N.-supervised elections leading to independence next year.

It was not clear how Waldheim could receive such assurances within two weeks. South Africa is well aware of the impact of its actions last month that imperil the U.S.-led efforts to find a peaceful way to Namibia's independence.

U.N. officials said it was very unlikely that Waldheim's special representative, Martti Ahtisarri, would be sent to Namibia or South Africa. The secretary general is likely to have contacts in New York either through the South African mission to the United Nations or a special emissary who would come to New York for talks.

"Time is short. South Africa should be under no illusions as to our determination," Barton said, speaking for the five Western nations.

The determination of the United States and its partners in the Namibia effort has been questioned in the last month by black African states which say South Africa already has shown that it has no intention of granting genuine independence to the territory it has governed as Southwest Africa since 1920 under a League of Nations mandate.

Secretary of State Cyrus Vance and ministers of the other four nations went to Pretoria in mid-October after South Africa indicated it would not permit U.N. permit U.N. supervised elections and announced its intention to hold elections next month excluding the South West Africa Peoples Organization (SWAPO), which has been conducting a low-level guerrilla war against South African authority in Namibia.

The delegation failed in its efforts to persuade South Africa to cancel the December elections, but returned saying that South Africa was willing to hold discussions on U.N.-supervised elections later and willing to see Waldheim begin planning for the U.N. military-civilian force that would aid the transition to independence.

These indications, Barton reiterated yesterday, illustrate that "South Africa still has an opportunity to demonstrate that it will cooperate with the United Nations."

The Security Council resolution passed yesterday calls the December elections an art of defiance of the United Nations and declares them null and void. It demands that South Africa cancel them and work instead toward elections under U.N. auspices.

In addition, it "warns South Africa that its failure to do so would compel the Security Council to meet forthwith to initiate appropriate actions . . ." The resolution mentions the U.N. charter provision giving it the power to impose economic sanctions.

A U.S. spokesman said there were no plans for a special American-led mission to South Africa, but that American efforts will concentrate on helping Waldheim and South Africa to begin their discussions.