A U.S. manufacturing firm, caught "between a rock and a hard place" in an international dispute over the Soviet-West European natural gas pipeline, went to court yesterday to stop the Reagan administration from penalizing it for complying with a new directive from the government of France.

Dresser Industries of Dallas asked U.S. District Court here to block Commerce Secretary Malcolm Baldrige and other department officials from acting against the firm if it delivers three gas pipeline compressors to a Soviet freighter at the French port of Le Havre.

The French government, in a direct challenge to U.S. policy, yesterday ordered the French subsidiary of the firm, Dresser France, to fulfill its previous contract by delivering the equipment, despite the anti-pipeline sanctions ordered by President Reagan June 18.

A Cabinet-level committee is to meet in Washington today to decide what to do in the face of the French challenge, according to administration officials.

At stake is the U.S. commercial as well as political relationship with several European allies, including France and Britain, as well as the credibility of Reagan's strongly held opposition to the proposed pipeline to carry natural gas from Siberia to western Europe.

As late as 12:30 p.m. yesterday the State Department, through spokesman John Hughes, expressed hope that France would refrain from a "direct confrontation with our controls."

Hughes was unaware that the French government already had issued such an order a short time before.

In Santa Barbara, Calif., where Reagan is vacationing, White House spokesman Larry Speakes later said the United States has a number of options, which he did not specify, which could be taken in the face of the French decision.

Administration sources said one possibility was a special U.S. mission to Europe in an 11th-hour attempt to reach a diplomatic settlement with the allies.

If this is considered too little or too late, the sources said, the policymaking is likely to center on placing Dresser on a "black list" of firms disqualified from receiving U.S. licenses for business abroad because of its failure to comply with the Export Administration Act.

Such a disqualification could be drawn to cover a narrow range or a broad range of the firm's international business in keeping with the administration's view of the seriousness of the offense.

Defense Department officials suggested the possibility of criminal action against Dresser for complying with the French order, according to an administration source. However, a high administration official said this is "not politically feasible."

A White House official said the main objective in any action would be to deter other overseas subsidiaries and licensees of U.S. firms from defying Reagan's order, even if there is no way to stop the delivery of the three compressors in Le Havre.

It was reported in France that the Soviet freighter Borodin is to dock at Le Havre today to pick up the compressors, which were made by Dresser France under license from General Electric.

According to Edward R. Luter, a senior vice president of the parent Dresser Industries of Dallas, the company had ordered its French subsidiary in June to stop work on pipeline components after receiving notice of Reagan's decision.

Jean-Pierre Chevenement, French minister of state for research and industry, "requisitioned" Dresser France's facilities under French law and ordered the firm to complete its order to manufacture and deliver the compressors for the Soviet pipeline.

Luter said that the French affiliate and its managers would be subject to criminal penalties, including a $60,000 fine and up to 12 months in jail, for failing to comply with the order from Paris.

On the other hand, U.S. penalties for failing to comply with Washington's order could put a serious crimp in the parent firm's $1.5 billion annual sales in international trade, which is a little more than one-third of the giant firm's total business.

Asked about his company's attitude, Luter said: "The best way you can put it is that we're between a rock and a hard place."

The suit filed here late yesterday, he said, "asks the court to decide which country's law we have to comply with." It also asks the court to enjoin Baldrige and the other officials from imposing "penalties or sanctions" against the parent firm if it complies with the French directive.

The French government's directive also could be applied to three other French companies involved in the pipeline project. The British firm John Brown is expected to face the same issue under orders from the British government within a few days.

Reagan justified his June 18 action on the continuing repression under martial law in Poland, for which he holds the Soviets responsible. He also has objected that the pipeline would increase Western European dependence on the Soviets.