For Canadians worried about the threat of Quebec's separation, last week was a week of unexpected and encouraging developments.

First, the separatist Parti Quebecois suffered a major setback in two provincial by-elections when French Canadian spokesmen who oppose independence for the French-speaking province were swept to easy landslide victories. The scope of the federalists' victories confounded all predictions.

Then Joe Clark, leader of the Conservative opposition who is seen as having an even chance to win in the May 22 general elections, asserted that Quebec had no right to secede from the confederation.

"I think that no province acting unilaterally has the right to end the federation, so no, I don't think that there is a right of self-determination" for Quebec, Clark said.

Apart from being an important boost for Canadian federalism, last week's developments were seen by politicians and commentators as bringing about polarization in Quebec that almost certainly will weaken the separatist position.

Psychologically, the by-elections upset the assumption prevalent until now that the Parti Quebecois was gaining ground from election to election and it never lost votes it had once acquired.

Since the Parti Quebecois swept past the Liberal Party in 1976 provincial elections, public-opinion polls showed that steadily gaining support for its goal of Quebec sovereignty in economic association with the rest of Canada.

In one of last week's by-elections the principal spokesman for French-speaking federalists, Claude Ryan, was elected to the provincial legislature by 65 percent of the vote in a district that another Liberal Party candidate had won with less than 39 percent in 1976.

Ryan, 54, who left his job as editor of the influential Montreal daily Le Devoir a year ago to rebuild the provincial Liberal Party, is an articulate leader who now gains a public platform to oppose Quebec Premier Rene Levesque.

There appears to be a consensus now that Quebec residents already are polarizing around Levesque and Ryan, who both are attractive leaders offering two distinct choices for Quebec's future.

While Ryan was elected in a rural district near Montreal, the second by-election was fought in Quebec City, the bastion of French separatism. Ryan's candidate won it by taking 58 percent of the votes, almost 10 percentage points more than another Liberal candidate got in 1976. The Liberal candidate also got twice as many votes as the separatist.

The Quebec City vote is regarded as especially significant since the Levesque government has used its most prominent members in the campaign. Levesque has charged that Ryan's forces conducted a "campaign of fear" about separatism but the separatist leader apparently was deeply disturbed by the outcome.

Clark's statement last week that he intends to keep Quebec in the confederation seems to have further complicated Levesque's political tactics. It was widely believed earlier that Clark, if elected, would be more inclined to negotiate with Levesque than Prime Minister Pierre Trudeau would be.

By asserting that Quebec has no right to self-determination, however, Clark has taken a step beyond the stand of Trudeau, who also opposes Quebec's separatism and has made the question of national unity the major issue in his campaign for reelection.

Trudeau appears to have been caught off guard by Clark's statement. Yesterday the prime minister said there might be negotiations on Quebec's independence after the Quebec referendum but that that "will depend on the results."

When asked if this was a shift in his position on the right of self-determination, Trudeau said "nothing of the sort.

"It's a mistake to talk about the right of Quebec to self-determination. What we should talk about is the right of Quebeckers as people - that is what the U.N. talks about - not units or parts within the territorial state," Trudeau said.

While neither Clark nor Trudeau appeared to have a detailed formula for dealing with Quebec separatists, Clark's statement this week and Trudeau's longstanding opposition to Quebec independence suggests that both major candidates in the May 22 election are equally determined not to permit a breakup of Canada.