The Carter administration's effort to help U.S. sugar growers with up to two cents a pound in federal payments appears to be illegal, Comptroller General Elmer B. Staats said yesterday.

As a result, the Agriculture Department plans to ask the Attorney General for a legal opinion on the program, and if he agrees with Staats, "then we're in trouble," said an Agriculture spokesman.

Staats' opinion, while not binding, is the latest in a series of buffets to the department's efforts to help sugar beet and sugarcane growers who, because of depressed world prices, are selling sugar for less than it costs to grow.

The administration's program calls for federal payments when sugar prices, on average, remain below 13.5 cents a pound, except that the payment would not exceed two cents regardless of how low prices fall. The government would pay sugar beet processors or sugarcane millers, who, after deducting administrative expenses, would pass the payment, to growers.

That arrangement was reached after officials determined there was no legal way to pay the farmers directly.

Staats agreed with that legal finding but characterized the pass-through program as an attempt to "do indirectly what it cannot do directly," and therefore the payments would be unauthorized by law.

Staats also said he has "substantial doubt" sugar payments would be a price support program as billed by Agriculture. Instead, he said, "the proposed program seems to provide, in essence, the equivalent of direct payments to producers, and we fail to see how the payments . . . would support the market price of sugar."

"We are doubtful that the proposed support program" as authorized under the law Agriculture used to set up the sugar support payments, he said.

Normally, the comptroller general can take action to force government officials to repay out of their pockets unauthorized payments. However, according to a spokesman for Staats, the Community Credit Corp., which would disburse the sugar money, is exempt from that.

The spokesman said that the last time reimbursement power was threatened was when Secret Service protection for former Vice President Spiro T. Agnew was continued after his resignation and ended soon after the threat.

Staats' view of the sugar program came in the form of a letter to Illinois Republican Reps. Edward R. Madigan and Paul H. Findley, the latter a longtome critic of government commodity programs and sugar policy.

Congress refused to continue the 40-year-old sugar act in 1974, (the year sugar prices hit almost 60 cents a pound wholesale). The act provided for stringent import quotas to keep tion capacity.

In releasing Staats' letter, Findley called on the Carter administration to suspend the program and submit a program to Congress for it to "hold hearings and work its will."

Findley and Madigan represent districts in the Corn Belt.

The corn refining industry has been opposed to the sugar program because it helps keep sugar prices low and competitive with a relatively inexpensive substitute for sugar - highly sweet corn syrup.

Anticipating an expanded market when sugar prices were high, the corn syrup industry now has excess production capacity.

Also yesterday, a spokesman for Rep. KIka de la Garza (D-Tex.) said 160 representatives support an amendment to the farm bill requiring the government to support sugar prices at 55 to 90 per cent of parity. Parity is about 26 cents a pound, and a 55 per cent level would set the price at 14.3 cents a pound. De la Garza represents a sugar cane growing area.

Sugar is now selling for about 10 cents a pound. One industry calculation says that for every penny increase in the price of sugar, Americans directly pay some $225 million more in sugar costs.