The battle lines in France's latest ideological war were visible recently in a bizarre confrontation that pitted a private entrepreneur, offering cut-price funerals, against the authorities of a sleepy provincial town.

On one side was a funeral cortege led by Michel Leclerc, one of France's best known discount barons, determined to punch a hole in a 1904 law that gives local councils monopolistic control over the burial business. On the other was the local police force, headed by an assistant mayor decked out for the occasion in the French tricolor, equally determined to uphold the monopoly of the state-approved company of undertakers, General Funeral Services.

Cries of "We want liberty" mingled with shouts of "The law must be respected" as Leclerc's unauthorized pallbearers were denied entrance to the cemetery.

After heated negotiations, conducted over walkie-talkies with the town hall, a compromise was reached that satisfied nobody. But it left the French way of death superficially intact. The bereaved would not be forced to accept an offer by the monopoly firm to carry out the burial for free, but neither would they be permitted to use the services of Leclerc. They ended up burying their loved one without professional help.

The incident at Arcachon in southwestern France last month was a relatively minor skirmish in what has become a larger war over the future shape of the French economy. It nonetheless provides a fair indication of the relative strength of the opposing forces and of the barriers to the import of seductive free-market ideas from across the Atlantic.

The brunt of the battle for discount merchandising in France has been borne by the extended Leclerc clan, headed by Michel Leclerc's elder brother, Edouard. In recent months, in addition to Michel's onslaught on established funeral parlors, the Leclercs have campaigned against what they regard as unfair price-fixing arrangements in the gasoline, pharmaceuticals, and book trade.

At the rhetorical and intellectual level, the Leclercs already have won their battle. All the major political parties, including President Francois Mitterrand's ruling Socialists, are officially committed to encouraging private businesses and streamlining the economy. "Liberalism" -- the term used here to mean less state intervention -- is suddenly all the rage.

There is considerable disagreement, however, over whether the sudden fascination with free enterprise is really going to make a practical difference in the way this economy is run.

"All the talk about liberalism in France right now is a bit like a violet that comes into flower in the middle of winter. It's nice to see it, and it's also unusual, but the fact remains that it's still winter," remarked another Leclerc, Michel-Edouard.

More detached commentators believe that the change in political rhetoric, particularly marked in the case of the Socialist Party that came into office denouncing the accumulation of private wealth, represents an important phenomenon in itself. It refects a change in public attitudes toward private entrepreneurs such as the Leclercs.

"It's an enormous change," said Francois de Clossets, a writer who published a bestseller a couple of years ago devoted to French obsession with the defense of acquired privileges. "The French are beginning to understand that they can only resolve their present economic troubles thanks to the people who go out and make money for themselves."

In De Clossets' view, which is shared by many other commentators here, the changed mentality can be attributed to "two fantastic teachers, the economic crisis and the Socialists."

"When the right was in power, calls for austerity measures were neutralized by the left-wing opposition, which insisted that the crisis did not exist. When the Socialists arrived in office in May 1981 , they discovered that the cures that they had been proposing did not work. After making a lot of mistakes, they eventually started talking about a crisis themselves -- and this impressed people," De Clossets said.

After being derided for years as nouveaux riches, capitalists such as the Leclerc brothers have suddenly found themselves media stars. The approval ratings for well-known French industrialists are shooting up in the opinion polls, at the very time when the prestige of trade union leaders is plummeting.

This new-found popularity somewhat bemuses Edouard Leclerc, now the owner of the largest supermarket chain in France, who remembers the widespread skepticism he encountered when he began his "crusade" for discount merchandising more than 30 years ago. "Everybody said I was mad," he recalled with a smile.

The Leclercs are now cashing in on the fact that for years they had to battle not so much against other competitive entrepreneurs but an ingrained respect for inherited riches but suspicion of acquired wealth. Newspaper and television advertisements for Leclerc supermarkets stress political and moral combat for the right to discount prices, not simply the lower prices themselves.

"Support the prices party," is the slogan pasted to billboards all over France that depict Edouard and his son as the leaders of a grassroots political movement made up of millions of consumers.

The principal political weapon employed by the Leclercs in their fight to lower prices is the 1957 Treaty of Rome that set up the European Common Market and encourages competition among member states. In January, the family scored a major victory when their lawyers got the European Court of Justice to declare illegal French government decrees setting a fixed price for gasoline.

The court's decision set off an immediate round of competitive price cutting by gasoline stations in France. It is likely to lead to the closure of as many as one out of every four as profit margins are reduced.

Competition may be fierce, sometimes even cutthroat, in the distribution trade, but it remains sluggish in other sectors. The American success in creating millions of new jobs has spawned hundreds of articles about "Reaganism" in the French press, but French industrialists seem reluctant to embrace American free-market ideas.

"The French are all in favor of liberalism as long as they don't have to suffer the consequences -- in terms of wage cuts or more flexible working hours," noted De Clossets who contends that much of French society is still organized around the principle of the "corporation," or special interest groups.