Vietnam will consider withdrawing some of its occupation troops from Cambodia if Thailand stops giving sanctuary and arms to the Khmer Rouge forces that are trying to regain power in Phnom Penh, Foreign Minister Nguyen Co Thach has said.

All of Vietnam's estimated 200,000 troops will leave only when Vietnam and its neighboring communist allies, Cambodia and Laos, have signed nonaggression treaties with China and the "Chinese threat" has ended, Thach said in an interview last month.

Thach stated Hanoi's position succinctly at the onset of our conversation: "It is very clear to everybody that we will withdraw completely whenever the Chinese stop their threat against Indochina. And we will withdraw partially if the Thais will stop the sanctuary on Thai territory and the supplying of arms to Pol Pot a Khmer Rouge leader ."

Vietnamese troops invaded Cambodia in late 1978 after three years of savage border clashes between the two. Within weeks, despite a punitive foray into Vietnam by Chinese forces, Hanoi was able to oust the Khmer Rouge government from Phnom Penh and install a more friendly government there.

The Khmer Rouge, nevertheless, have been able to sustain a significant guerrilla war against the Vietnamese occupation forces. A lesser military effort is being mounted by troops under Cambodian ex-premier Son Sann, from camps along the Thai-Cambodian border.

Thailand and its allies in the Association of Southeast Asian Nations are trying to organize a coalition government consisting of the Khmer Rouge and Son Sann groups plus followers of former Cambodian head of state Prince Norodom Sihanouk. Thach denounced this move as "blunt interference in the internal affairs of Phnom Penh." Let the coalition sit in Bangkok, Peking or Singapore, he joked, "we say they have no room in Cambodia."

The foreign minister refused to be drawn into any discussion about a political settlement between the contending Cambodians. "But I can say only complete withdrawal and partial withdrawal. Nothing else. For other matters, for the internal matters, it is up to the Phnom Penh government to decide," he said.

This past year has seen some slight easing in relations between the United States and Vietnam. Washington has relaxed its stringent trade embargo to permit millions of dollars in goods to be shipped to Vietnam in the form of family parcels from refugees in the United States.

This fall, after years of haggling, the two countries also agreed on an orderly system of emigration for Vietnamese who are sponsored by relatives in the United States. About 2,000 persons left in October and similar numbers departed in November and December. Under this program, American consular officers fly into Vietnam and process the emigrants at the airport.

"There is some improvement," Thach said, "because we have better cooperation than last year. Perhaps there is some good will from both sides."

Nevertheless, Thach is sharply critical of what he says is U.S. policy to encourage illegal departure, the so-called boat people who flee in whatever vessel they can lay their hands on. "Every time they say on VOA Voice of America that the 7th Fleet is in what place in the South China Sea. You can join the 7th Fleet and so on. The location of the Midway and so forth . . . .

"This is very bad. They even say that tomorrow there is strong wind from northeast and strong wind from southeast, and so on. Very bad . . . . They encourage the illegal departure. They have even sent to them some seasickness pills from America, sent by their families. What is this for? To encourage them to go by illegal means."

Following its invasion of Cambodia, Vietnam's relations with most of the rest of the world went into a deep chill. Recently there has been a thaw. France's new Socialist government has extended $20 million in aid. Ties with Sweden are regaining their old closeness.

Japanese and South Korean businessmen move quietly in and out of Hanoi in growing numbers. Singapore, Vietnam's most outspoken antagonist in Southeast Asia, supplies all the oil products the Vietnamese can afford.

In the interview Thach made it clear that Vietnam regards its actions in Cambodia as directly connected with its relations with China. Those relations, which for centuries have been marked by hostilities, are now affected by the rivalry between China and the Soviet Union that has been increasingly focused in the lower Mekong River Basin. As Vietnam's relations with China, which had been relatively close during the U.S. military involvement in Indochina, turned hostile following Hanoi's victory in 1975, the Vietnamese turned more and more to the Soviet Union for economic, political and military support.

Thach stressed, however, that Hanoi does not regard itself as a Soviet client. "We are not playing a game of equilibrium . . . we are independent; we stand on our two feet . . . so, we never lose equilibrium."

In a move apparently designed to emphasize its independence from the Soviet Union, Vietnam is planning to expand its trade with noncommunist countries dramatically during the five-year plan to be adopted in March to about $1 billion, or 30 percent its total trade.

The issue of Cambodia appears to be the insurmountable roadblock to any attempt to improve relations between the United States and Vietnam. Washington insists that the Vietnamese must get out; Hanoi is equally adamant about remaining there until, at the very least, it gets some security arrangement, that is, until the "Chinese threat" is over.

Referring to this stalemate with the United States, Thach said reflectively, "Thirty years, already. Enough experiences for you, enough experiences for us. But we can exist--and better than before."