Rank-and-file Teamsters have overwhelmingly ratified a new three-year contract that forced the Carter administration to bend and stretch its anti-inflation wage guideline, the union announced yesterday.

The contract, negotiated after a 10-day strike and lockout last month, was approved nearly 3 to 1 in mail balloting supervised by the Labor Department.

Dissident Steelhaulting members of the union, who conducted a three-week eildcat strike against the contract, approved it more than 2 to 1, according to a separate count.

The new Master Freight Agreement, covering about 300,000 truck drivers and warehouse workers, will increase wages, cost-of-living payments and benefits by about 30 percent over three years, according to both industry and union estimates.

The contract is somewhat less costly than the old pact that expired March 31, but exceeds the 7 percent ceiling that President Carter proposed last year for annual wage and benefit increases.

However, the administration called the pact a guideline victory, justifying the term by exempting some labor costs and assuming an annual inflation rate of 6 percent, substantially below the current annual rate, which is 13 percent if the rate of the last three months continues. The union and industry assumed an 81/2 percent rate in their calculations.

In a statement on the ratification vote, which came as no surprise, Teamsters President Frank E. Fitzsimmons said the approval majority "provides without a doubt that this is the best national freight contract ever negotiated."

The contract will increase the average Teamster's hourly wage, now about $9.70, by $1.50 over three years, including 80 cents an hour in the first year.

It also will provide 75 cents an hour for health, welfare and pension increases and more frequent payment of cost-of-living increases, which recover about 60 percent of buying power lost to rising prices.

When negotiators for the Teamsters and major trucking companies failed to reach an agreement by the March 31 deadline, the union-the naion's largest - called a selective strike against about 70 trucking firms. Trucking Management Inc., the industry bargaining group, responded with a nationwide "defensive shutdown," or lockout, by all its members.

The trucking shutdown was barely felt by consumers as food, fuel and other vital products contained to move. The main casualty was the auto industry, which suffered an immediate interruption in its supply of parts, which are moved by truck, and laid off thousands of workers.

The strike ended when negotiators reached a tentative agreement April 10, shortly before the union would have had to begin paying strike benefits to its members.

The ratification results showed that 127,872 Teamsters voted for the contract and 45,577 voted against it. On the steelhaulers pact, 5,899 voted yes and 2,324 voted no.