The Navy said Thursday it would temporarily relieve the commander of the USS Dubuque after allegations that the ship failed to give adequate aid to a boatload of Vietnamese refugees who reportedly later resorted to cannibalism to survive.

A Navy statement said Capt. Alexander G. Balian would be relieved of his command, perhaps as early as Thursday."The commanding officer of the USS Dubuque . . . will be temporarily assigned to the commander, Naval Surface Group, Western Pacific, pending results of an inquiry into the sufficiency of the assistance provided by his ship to a Vietnamese refugee boat in the South China Sea on June 9, 1988," the service said in a brief statement.

Balian will be replaced by Capt. David Wetherell, who was flying Thursday to the Persian Gulf for the change of command, the Navy said. The Dubuque, an amphibious landing ship, encountered the Vietnamese refugees while it was steaming toward the gulf.

The Navy stressed that Balian was not being relieved "for cause" in a disciplinary move, but rather was being replaced temporarily on an administrative basis until an investigation in completed.

"But they are going to relieve him," said one official who asked not to be named. "The question is obviously, `Should he have rendered more assistance?' The allegations raise serious questions."

The Navy and the United Nations High Commission on Refugees are investigating reports of murder and cannibalism that surfaced earlier this week in a Philippine newspaper. The Vietnamese boat people eventually were rescued off the Philippines and are in a refugee camp there.

The newspaper quoted some of the survivors as saying they killed and ate some of their fellow passengers to stay alive after they encountered the Dubuque on June 9. Two of the victims reportedly died of starvation, but three others allegedly were murdered through drowning and then eaten.

Some survivors alleged that the Dubuque refused to take them aboard even though their boat was disabled and they were dying of exposure and starvation. Instead, the ship gave them food and water and left them because it was on a "dangerous mission."

The refugees are claiming that by June 9, "there was one dead refugee aboard, the motor was not working, they were drifting for 19 days, people had died of exposure, hunger and thirst," said Robert Cooper, representative of the U.N. High Commission on Refugees in Manila. He added that the "great majority" of deaths occurred after the encounter with the Dubuque.

Navy regulations call for U.S. warships "to extend humanitarian assistance as needed" in such circumstances. "In the case of an unseaworthy vessel, adverse weather or other special circumstances, the refugees may be embarked and transported to the Navy ship's next port of call," the regulations state.