Residents of this capital were ordered today to dig bomb shelters, and troops dug in following government charges that Thailand had helped rebels seize and island in the Mekong River six miles from here.

Official sources said it was feared that fighting between rightist rebels and government troops might spill over onto the Thai-nide of the river and that Thailand would retaliate.

Soldiers patrolled the streets and other troops dug foxholes along the bank of the broad river that separates the two countries. Loudspeakers ordered residents to dig bomb shelters under their houses.

Two armored personnel carriers were stationed at the river, their machine guns pointing toward Thailand, about a mile away across this muddy waters.

The Laotian government closed the only official border crossing after accusing the Thai government of helping the rebels and of hatching "vicious schemes against the security of Laos."

The Thai provincial governor on the other side of the river told reporters that Laotian troops had driven the rebels off one small island on the Laotian side of the river, but the rebels had seized a nearby island and killed six defenders.

The governor said shells had hit Thai villages and warned that Thailand would "retaliate" if the shelling continued. No casualties were reported.

Laos said in a diplomatic note last week that Thai authorities had helped or approved of the island attacks. Thai officials denied complicity in the affair.

Senior Thai officials visited the Thai bank of the Mekong to survey the situation.

The dozen U.S. diplomats stationed in Vientiane were unaffected by the situation, Western diplomats said.

KPL, the official Lao news agency said the Laotian government delivered a note to the Thai embassy in Vientiane charging that the rebels were "supported by the Thai side."

There was no official Thai reaction to the note.

The Communist Pathet Lao took control of the Laotian government in 1975 and has been increasingly harassed by rightist rebels. The island seizure was the closest rebel activity yet to Vientiane.

Premier Kaysone Phomvihan recently confirmed that the rebels were a growing problem, telling a Soviet publication that his government gave top priority to "tracking down and punishing . . . the reactionary diehards who continue to oppose the new regime."