The Commerce Department ruled yesterday that the Canadian government provided $91.2 million in unfair subsidies to a Quebec corporation that beat out a Michigan rival for a contract to provide 825 subway cars to New York.

The ruling, which Commerce Secretary Malcolm Baldrige described as a "warning" to foreign countries, is probably the strongest action taken by the Reagan administration in any of the proliferating trade disputes with friendly countries.

If, as expected, the U.S. International Trade Commission rules after a hearing on March 15 that the deal caused "material injury" to the unsuccessful American bidder, Commerce will impose duties equaling the amount of the subsidies.

Baldrige said the ruling shows the Reagan administration "is resolved to eliminate any unfair advantage foreign governments give a product sold in the United States. Offsetting duties will be imposed in full if any sales even threaten to cause injury to U.S. workers and businesses." He said this should serve as a warning to foreign suppliers "who think government-subsidized financing is the way to get a competitive advantage."

But a spokesman for the New York Metropolitan Area Transportation Authority, which ordered the cars from Bombardier Inc. of Montreal, said the authority will go ahead with the purchase and will continue to oppose the subsidy ruling, in court if necessary.

"Our position has been and remains that any countervailing duty would be an outrageous and unfair penalty to the taxpayers and subway riders in New York," said a spokesman .

The dispute is over a contract that New York signed with Bombardier last year to buy 825 badly needed subway cars for $650 million. The Export Development Corp. of Canada financed 85 percent of the price at an interest rate of 9.7 percent for 10 1/2 years.

That rate "was not commercially available" at the time, and amounted to an unfair government subsidy, Commerce found. No similar line of credit was available to the losing bidder, the Budd Co., of Troy, Mich., the only U.S. builder of subway cars.

One irony of the ruling is that Treasury Secretary Donald T. Regan found earlier that quality, not financing, was the decisive element in New York's decision. Others are that Bombardier has agreed to assemble the cars in Vermont, providing about 150 jobs for American workers; that although Budd is based in Michigan, it is a wholly owned subsidiary of Thyssen A.G. of West Germany; and that the decision benefits Japan, because the cars were designed by Kawasaki Heavy Industries, and Bombardier will build them under a licensing agreement.