The Export-Import Bank, which normally provides low-cost financing to help sell American products overseas, yesterday offered its first cut-rate loan to cover a purchase in the United States.

The unusual offer was made to save an $8.2 million sale by an American company, Allis-Chalmers Hydro Inc., for power-generating equipment to be installed on the Allegheny River in Western Pennsylvania.

Without the Ex-Im offer of a 5 percent loan, the bank said the sale would have gone to a Brazilian company supported by government-subsidized financing.

With the prime rate -- a key indicator of business borrowing costs -- at 9 percent, the terms of the Ex-Im loan are far below commercial rates.

The loan offer was made after Treasury Secretary James A. Baker III, acting on what bank officials described as "trade-policy grounds," authorized the Ex-Im Bank to match the Brazilian financing.

"I am pleased that the Ex-Im Bank was able to respond so positively to combat this unfair trade practice," said John A. Bohn Jr., first vice president and vice chairman of the bank.

He has been nominated by President Reagan to head the bank, whose mission is to promote overseas sales by its low-cost financing.

President Reagan took a tough stance against subsidized export financing as part of his trade initiatives last fall, authorizing the bank to move aggressively to counter other countries' cut-rate loans that were being used to snag overseas sales from American companies.

The president set up a $300 million "war chest" to be used against these subsidized loans.

Most of these attacks were aimed at European nations, particularly France, which former Ex-Im Bank president William H. Draper III attacked in harsh terms for its practice of combining aid and loans in so-called mixed-credit financing to win contracts.

Brazil benefited from one U.S.-French battle over mixed credits, when Draper said the Ex-Im Bank would offer subsidized financing to help a Miami company win a $52 million contract to sell navigational and communications equipment to 12 Brazilian airports.

The offer was made to beat French financing in support of one of its companies.

"The French have come into what we consider our market -- Brazil -- with mixed credits in thepast, and we will fight them when they do it," Draper said in announcing the Ex-Im move in November.

Now the shoe appears to be on another foot, and the Ex-Im Bank is fighting Brazilian government subsidies to land sales in the United States for its companies.

"We are very concerned about the growing use of noncompetitive export credits by the Brazilian government to finance sales of power-generating equipment, general-aviation aircraft and other products in the United States," Bohn said.

"We think our action today will be very effective in this specific instance, but we expect the administration will vigorously pursue a wider solution to this growing trade problem," Bohn said.

Allis-Chalmers Hydro, the manufacturer of the hydraulic turbine generators, asked the Treasury Department to intervene to protect its sale from the Brazilian competitor, Voith Brasil S. A. of Sao Paulo.

The Ex-Im offer is competitive with the financing terms the Brazilian company was getting from the Brazilian Export Credit agency, CACEX, the bank said.

"While we are sympathetic to Brazil's need to export, it doesn't need these subsidies in order to be competitive," Baker said.

"The subsidies distort trade, can be a source of harm to U.S. trade interests and make it more difficult for the United States to keep its market open," Baker said.

"Moreover, given Brazil's debt problem, we wonder whether such export subsidies to industrialized countries are appropriate," Baker added.

Brazil came under attack on Capitol Hill yesterday for using its status as the world's largest debtor nation to practice protectionism at home.

Rep. Stan Lundine (D-N.Y.), chairman of the House Banking Committee's panel on international development, said these practices hurt U.S. industries.

Paula Stern, head of the international Trade Commission, agreed, calling Brazil a "house of horrors from the point of view of persons who believe markets should be open."