The United Auto Workers joined the Teamsters yesterday in giving qualified support to President Carter's anti-inflation program as administration officials voiced satisfaction with initial business and labor cooperation.

But a third major union, the International Association of Machinists, indicated it will follow through on earlier threats to disregard the 7 percent wage guideline in negotiating new contracts.

The 950,000-member IAM will negotiate contracts for airline ground crews later this year. The Teamsters, with 2 million members, and the UAW, with 1 1/2 million members, will dominate next year's heavy round of contracrt bargaining.

Labor Secretary Ray Marshall, a principal architect of the wage-price guidelines program that Carter announced Tuesday night, told reporters he expected it would take six to eight months before the inflation rate begins to taper off in response to the program.

"I don't see any miracles, any abrupt change," but rather a "gradual coming down," he added.

The president's program calls for a 7 percent limit on wage increases and a less specific price standard to bring the overall inflation rate down from 8 percent to less than 6 1/2 percent next year. Although it includes some government sanctions, the program is voluntary and thus heavily dependent on union and corporate cooperation.

Marshall said many individual unions have indicated to him they are "pleased" with the program. Both he and Stuart Eizenstat, the President's domestic policy adviser praised the qualified response of the Teamsters on Wednesday as helpful. Eizenstat said business response was also largely favorable.

The UAW, in a statement issued by President Douglas A. Fraser after a meeting of its executive board in Detroit, embraced the goals of the program but called for flexibility in carrying it out, including drecognition of productivity gains made by auto workers.

By implication, this would mean a higher-than-7 percent ceiling for UAW members.

"There are numerous aspects of the president's voluntary program that remain unclear," said Fraser, "but the UAW is hopeful that the plan can be administered in an equitable manner that achieves the goal of reducting inflation."

Fraser endorsed Carter's proposal for tax rebates to reward workers for compliance and called for a special post-election session of Congress to enact it.

"We will know well in advance of the crucial negotiating periods whether or not it (the inflation program) is succeeding," he aded, implying that the union's cooperation will depend on what happens between now and next summer.

Teamster President Frank E. Fitzsimmons appeared to go further than Fraser in suggesting "adjustments" in the wage standard, but Marshall ruled that out yesterday in saying that no modifications in the guideline are anticipated, at least for 1979.

Still to be heard from is the AFL-CIO, whose executive council will meet next Tuesday to formulate a response. Neither the Teamsters nor the UAW is a member of the AFL-CIO. The IAM belongs to the federation, but its president William W. Winpisinger, often dissents from its policies.

The inflation package also drew support from Federal Reserve Chairman G. William Miller, who described it as a "balanced, concerted and sustained program to fight inflation" in a speech Wednesday night. Miller's support is important because of the Fed's independent role in monetary policy.

While support appeared to build at home, the dollar hit another record low on foreign money markets. Robert S. Strauss, the President's trade negotiator and former inflation adviser, said the response was "very serious" but contended it was an "overreaction" and "inaccurate assessment" of the president's program.

Meanwhile, Agriculture Secretary Bob Bergland defended the administration's plans for an acreage set-aside program to curb next year's output of corn and other feed grains as consistent with the anti-inflation program.

Bergland, in an interview with the Associated Press, said the set-aside program will have "no inflationary effect" because the world has "more than ample" stocks of grain on hand. He said the program has been planned for some time and will be issued as soon as the White House gives the go-ahead.