A Canadian tourist was shot and killed Sunday when unknown assailants, believed to be Moslem guerrillas, opened fire on a tourist bus in Afghanistan, Canadian officials said today.

The victim, identified as Gaetan Dion, was the seventh Westerner slain in three days. On Friday, six West Germans, including two children, were killed while having a picnic near Buddhist ruins at Lataband Pass, about seven miles west of Kabul, the Afghan capital.

It is believed that the Germans may have been mistaken for Soviet citizens. Thousands of Soviet advisers who help support the government of Nur Mohammed Taraki are hated in Afghanistan and have been the target of a number of attacks.

Soviet advisers captured earlier this year when Herat fell into the hands of Moslem rebels reportedly were tortured to death.

Few details were available about Dion's death today. The Canadians do not have an embassy in Kabul, but their political officer in Islamabad, Pakistan, is expected to arrive in Afghanistan Tuesday.

It is not known whether any others aboard the bus were killed or injured, or where the tour originated. The bus, which was en route from Herat to Kandahar when it was attacked, is believed to be one of several that travel between Europe and India.

In another incident Friday, the U.S. attache in Afghanistan, Lt. Col. Michael E. Cavanaugh, was beaten. He said his assailants also threatened his life.

Recently, all Western embassies have been warning their nationals to keep out of Afghanistan unless a visit there is vital.

Meanwhile in Peshawar, a newly formed alliance of four Afghan guerrilla groups is meeting in a house on the road to the Khyber Pass this week to plan what is believed to be a last thrust against the Taraki government before winter closes in.

Snows at the end of December will drive most of the guerillas and their families from the mountaintop caves that protect them from raids by the Afghan Air Force into the valleys, where they are vulnerable. The guerrillas hope to inflict heavy losses on Moscow-backed government troops before the winter.

[Meanwhile, in Moscow, Soviet President Leonid Brezhnev on Monday met Taraki, who was on his way home from the conference of nonaligned nations in Havana. Brezhnev said Afghanistan can count on the Kremlin's "all-round interference" in Afghan affairs, the Associated Press reported.]

Fighting is already going on around Gardez, the capital of Paktia Province. Assorted rebel groups have besieged the town for about 20 days. Gardez is about 75 miles from Kabul.

"After we capture Gardez, it will be Kabul," a rebel commander said yesterday. "There is no other place in front of us."

However, none of the rebels claim that a victory for them is likely this year, despite the advances they have made. Some believe Taraki will be defeated within 18 months; others say they are prepared to fight on for 10 years.

Despite the new alliance, the rebel groups are far from united, although they claim to cooperate when they actually meet on the battlefield.

At Peshawar, where all the guerrillas have their headquarters, the differences are evident.

Two important groups have not joined the alliance, and even the four that have appear unable to agree on a leader. The groups contradict each other's claims and disagree fundamentally on tactics.

For example, Sibghatullah Mujaddidi, leader of the National Liberation Front and a member of the alliance, said Sunday that the alliance had issued a decree ordering all civil servants and members of the Afghan Army to leave their posts as soon as possible.

Mujaddidi said, "If they are not in the Communist Party, and are only working to protect themselves from punishment, then they can join the fighters and leave their jobs. Otherwise if they don't leave, they will not be accepted in future."

Another faction of the group that has not joined the alliance was bitterly critical of the instruction.

"Who is going to feed these people here in Pakistan?" an official of the faction asked. "If they are coming to fight, they have to take care of their families, too. Probably they could do a better job for us over there than coming here. It means we are leaving everything for the pro-Taraki people, and this is not wise. At the moment we get a lot of information from the people who are working from within."

Another cause for controversy is the assault on Gardez.Several groups claim to be leading the fight, and it is difficult to assess their conflicting claims. Many Western diplomats say that, given the basic disunity of the guerrillas, it is surprising that they have gotten as far as they have.

The rebels' hold on parts of the country appears to be tightening, but their leaders fear they could lose the initiative.

"We must hurry with our plans because the time is short and winter is coming," said Mujaddidi of the National Liberation Front. "Our people will have to come down from the mountains, and we think this will benefit our enemies."