A huge blue, red and white tricolor swirled beneath the Arc de Triomphe today as the soldiers of the French Foreign Legion marched down the Champs-Elysees slowly, almost arrogantly, with a swaggering motion of their shoulders and hips, as if taking possession of some flea-ridden outpost in the Sahara desert.

Taking the salute at the foot of the tree-lined avenue, surely one of the most magnificent parade grounds in the world, was President Francois Mitterrand, elected in a Socialist landslide in May 1981.

But as the television cameras panned between the solitary figure of France's first left-wing head of state in a quarter of a century and the bearded legionnaires in their white kepis and leather aprons, a simple question may well have come to the minds of many ordinary Frenchmen: were they witnessing Mitterrand's last Bastille Day appearance?

The issue of whether Mitterrand can complete his seven-year mandate as president has assumed growing importance over the last few months because of opinion polls showing that his Socialist Party is headed for almost certain defeat in legislative elections next March. His political future is thus likely to depend on whether he can reach an understanding with a right-wing government on sharing power.

The stirring patriotic symbolism of France's annual national day provided Mitterrand with an opportunity to address a problem that has been preoccupying politicians on both sides of the ideological divide.

Interviewed during a garden party at the Elysee presidential palace, he sought to depict the role of the head of state in terms of a guarantor of national unity above day-to-day politics.

"The president of the republic cannot be confused with any particular segment of the nation. He represents the nation as a whole," Mitterrand said.

A right-wing victory in next year's elections for the National Assembly would create a potentially unstable political situation for which there is no precedent under the French Fifth Republic.

Ever since Gen. Charles de Gaulle revised the constitution in 1958, all French presidents have been able to rely on a pliant National Assembly to nominate a government of their own choosing.

Mitterrand has recently begun dropping hints that he would be prepared to share power with a right-wing government.

At an informal luncheon with French political journalists last week, he suggested that the president should be responsible for overseeing national security and foreign policy while the government looked after domestic affairs.

The division of authority proposed by Mitterrand is based on his interpretation of the Fifth Republic's constitution, which describes the president as "the head of the armed forces," the "guarantor of national independence," and responsible for negotiating and ratifying treaties with foreign powers.

Mitterrand was quoted by French journalists as saying that any attempt by a future right-wing government to deprive him of his responsibility for the conduct of foreign policy would amount to a "coup d'etat."

Leaders of the right-wing opposition parties have given every indication that they intend to resist Mitterrand's attempt to reserve foreign policy to himself. They have also objected to his "coup d'etat" accusation, recalling with relish that in 1964 he wrote a book entitled "The Permanent Coup d'Etat," in which he described the Fifth Republic constitution as a recipe for Gaullist dictatorship.

"If we win the 1986 elections, it will be our policies that are applied in all areas, including foreign policy," said Jean-Claude Gaudin, the parliamentary floor leader of the centrist Union for a French Democracy party.

In his television interview today, Mitterrand sought to correct the impression that he regarded a right-wing victory in next year's elections as inevitable. He said he would try to do everything between now and next March to convince the French people that there is no alternative to the policies being pursued by the present Socialist government.

This year's Bastille Day celebrations coincided with the 50th anniversary of a huge demonstration in Paris to launch a left-wing alliance between Socialists and Communists known as the "Popular Front." The demonstration, which was followed by the election of a left-wing coalition government the following year, quickly became part of socialist mythology.

In keeping with his present determination to depict himself as "president of all the Frenchmen" rather than a left-wing leader, Mitterrand appeared to ignore deliberately the anniversary. In other circumstances, it would have attracted a lot of attention.