Secretary of State Cyrus Vance and four other Western foreign ministers are planning to fly to South Africa next week in a last ditch effort to win agreement for the U.N. peace plan for the disputed territory of Namibia.

Vance and the foreign ministers of Britain, France. West Germany and Canada will tell South African Prime Minister P. W. Botha that their governments will not veto U.N. economic sanctions if Pretoria continues to refuse to cooperate with the Western sponsored independence plan, according to senior diplomatic sources.

The United States and itsWesten allies have in the past vetoed attempts by African nations to impose sweeping economic sanctions against South Africa, arguing that a complete isolation of Pretoria would prevent the West from exercising moderating influence.

Secretary General Kurt Waldheim is due to report to the United Nations by Oct. 23 on the future of the disputed territory, which has been known as Southwest Africa since South Africa took control of it in 1917.

A report of continued deadlock between the five-nation "contact group" and the South Africans is almost certain to trigger a new effort by African nations to get the Security Council to impose economic sanctions on South Africa, diplomatic sources said.

South Africa's former prime minister John Vorster had agreed in negotiations with the five countries to a plan for U.N. supervised elections and a transition to independence that would have included a role for the African querrilla group that has waged a decade-long insurgency against the South Africans in the desert territory.

But that agreement was shelved last month when Vorster retired and Botha was chosen as his successor. In a statement this week, Botha emphasized that South Africa was going ahead with its own plans for local elections and setting up a government without U.N. support. Botha added, however that the door to negotiations over the U.N. plan was not completely closed.

A senior State Department official said here yesterday that Vance would not attempt to arrange a peace conference on Rhodesia during his southern African trip, which is expected to start Thursday and to last no more than five days.

Vance will meet Rhodesian Prime Minister Ian Smith in Washington Tuesday in a new effort to persuade the Rhodesians to come to an "all-parties" negotiating conference to end the six-year-old guerrilla war that increasingly threatens Smith's rule, the official said.

The secretary will formally open Egyptian-Israeli negotiations on a peace treaty Wednesday in Washington but reportedly does not expect to participate in those talks after the opening.

Vance again devoted much of his day here to pressing for a cease-fire in the fierce fighting in Lebanon.

A senior State Department official disclosed that President Carter yesterday sent a letter to Syrian President Hafez Assad in Moscow stressing U.S. concern over the heavy fighting and Carter's strong support for an immediate cease-fire.Syrian troops have been bombarding Christian militia areas in Beirut since Saturday.

The official said that if the cease-fire had not been achieved by today, the United States "would probably" ask for an urgent Security Council meeting and seek a resolution calling for a cease-fire. The Carter administration has been in touch with the Soviet Union on the subject of a Security Council meeting, but the official declined to give any assessment of the likelihood of Soviet cooperation.

The Security Council last Friday approved the contact group plan for Namibia which involved sending 7,500 military and 1,200 election officials to Namibia to prepare the territory for independence. It would be the biggest U.N. operation since peacekeeping troops were put in the former Belgian Congo in the early 1960s.

Vance said in a television interview early yesterday that he and the other foreign ministers "are prepared" to go to Pretoria. But in briefing reporters last night the senior U.S. official said that the trip would go forward as soon as the five countries received the expected formal acceptance of the South Africans to the proposed talks.