As United Nations Secretary General Javier Perez de Cuellar prepares to visit southern Africa next week to try to resolve details of a Namibian settlement, rebel forces in neighboring Angola are conducting a major military offensive that is making the prospects of a settlement seem more remote.

South Africa, supported by the United States, has made the removal of Cuban troops in Angola a precondition for granting independence to Namibia, also known as South-West Africa. Observers here point out that the offensive is increasing the Angolan government's dependence on the 30,000 Cubans bolstering its hard-pressed Army.

It also has been suggested here that South Africa may use the offensive as a pretext for setting a second precondition for settlement--the holding of free elections leading to a unified government in Angola as the only way to end the civil war there.

The suggestion is that South Africa is preparing an argument that it cannot agree to Namibia becoming independent while its northern neighbor is in a dangerous state of instability.

The offensive, now producing what could be the heaviest fighting of the eight-year Angolan civil war, was launched Aug. 1 by the National Union for the Total Liberation of Angola (UNITA), a rebel group led by Jonas Savimbi and reported to receive aid from South Africa.

The official Angolan news agency, Angop, said South Africa actively is assisting Savimbi's rebels in the fighting and that South African air raids and airborne troops formed the spearhead of a fierce assault Monday that captured the strategic town of Cangamba, 300 miles north of the Namibian border.

Angop also has reported a buildup of South African forces in Cunene Province around the town of Ngiva, just north of the Namibian border.

On Tuesday, the government newspaper Jornal de Angola, speculated that the aim of the offensive was to cut off the whole of eastern Angola. Most of it is thought to be under the control of Savimbi's guerrillas, with a few urban "islands" held by government forces.

The chief of the South African defense force, Gen. Constand Viljoen, has rejected the charges of his country's involvement in the fighting and has said that Cangamba is beyond the range of the locally made Impala jets that Angop says were used to strafe and drop napalm on the town.

Viljoen said South Africa would never launch air attacks against civilian targets. He charged that the Angolan accusations were merely an attempt to disguise UNITA successes.

The defense force chief admitted, however, that South Africa was making "reconnaissance flights" over southern Angola, which he said were necessary because Angola supported Namibian insurgents of the South West Africa Peoples Organization and because Soviet-built ground-to-air missiles were deployed there.

The first hint that the Angolan rebels' offensive might be linked to a Namibian settlement came from Savimbi this week. He said his group's successes showed that direct negotiations with the Marxist ruling party, leading to a unified government, were the only way to end the civil war "and pave the way for the independence of Namibia."

Picking up this theme the next day, the semiofficial South African Broadcasting Corp. said one of the tasks facing Perez de Cuellar on his visit would be to make a thorough assessment of the situation in Angola.

"It is becoming more evident that developments in Angola are going to have a definite bearing on a settlement of the South-West African dispute," the radio said. "In these developments, the UNITA factor can no longer be ignored."

In a report from the Namibian capital of Windhoek today, the liberal Rand Daily Mail of Johannesburg said rumors began circulating some months ago that South Africa was planning to demand elections leading to a new government in Angola as a second precondition for a Namibian settlement.

The report said South Africa wanted this as a "standby obstacle" to a Namibian settlement in case U.S. negotiators succeeded in persuading Angola to dispense with the Cuban troops. According to the newspaper, diplomatic and South African government sources had confirmed the account.

Observers here and in Namibia believe that South Africa, for domestic political reasons, does not want a Namibian settlement at this stage.

The administration of Prime Minister Pieter W. Botha is facing a backlash from its white Afrikaner supporters over plans to give token parliamentary representation to some nonwhite groups, and it is felt Pretoria wants time to recover from this before facing a second backlash over an agreement to withdraw from Namibia.