An impending struggle on Capitol Hill over funding the food stamp program is seen as a major test of President Carter's promise not to make the poor bear the burden of reducing the federal budget deficit.

Administration officials say they expect stiff congressional opposition to Carter's proposal to remove the $6.18 billion ceiling on 1980 spending in the food stamp program.

They say $6.9 billion will be needed to hold benefits at present levels in the face of rising unemployment and food prices that are increasing faster than Congress anticipated when it imposed the ceiling in 1977.

Unless Congress goes along, benefits probably will have to be slashed across-the-board to the 17.4 million Americans expected to take advantage of the program in the 1980 budget year.

The main concern of administration officials is that key congressional committees may want to look even more economy-minded than the president this year and may aim at programs benefiting the poor.

Carter has proposed making substantial cuts in school lunch and other nutrition programs that do not primarily affect the poorest families. But administration officials fear Congress will block those cuts and vote reductions in the food stamp program.

"When the country gets mean about fighting inflation, they (the legislators) always look to the people who are least able to defend themselves," said Assistant Agriculture Secretary Carol T. Foreman.

The Senate Agriculture Committee takes up Carter's nutrition budget Tuesday. Sens. George S. McGovern (D-S.D.) and Bob Dole (R-Kan.) have sponsored a bill removing the spending ceiling. However, an aide for Sen. Richard G. Lugar (R-Ind.), who plans to vote against this, said a "close" decision is expected in the agriculture committee.

Lugar feels "we have to hold the line on spending everywhere," according to an aide.

Opposition to relaxing the ceiling is also expected from the House Agriculture Committee and from congressional budget committees.

The basis for the coming fight over the spending ceiling in Carter's pledge in his budget message to blend compassion and frugality in his programs.

He said that "even when budget restraint is essential, we will continue as a compassionate society to meet our commitments to the disadvantaged" and added that the budget would contain adequate funds for "those Americans most truly in need."

In the view of supporters of the present food stamp program, this would not be possible if the 1977 spending ceiling is left on.

They say toughened controls on fraud and new eligibility requirements, effective March 1, meet congressional complaints that some people who were not poor received food stamps at one time.

The new eligibility requirements are expected to reduce the rolls by more than one million people, but rising unemployment this year could expand the rolls by 1980.

An even more serious problem, however, is the rapid rise in food prices. When Congress in 1977 placed the ceiling on food stamp outlays, projections were for food prices to be 12.5 percent higher by 1979 and 16.9 percent higher by 1980. Instead, prices are now 26 percent higher and are estimated to be 36.2 percent higher in 1980 than the 1977 base.

Food stamp benefits are updated every six months to take account of changes in food prices, so the benefits increase as inflation continues in supermarkets.

"It's not fair to make poor people pay for an overall economic situation that is beyond their control," said Geoffrey Becker of the Washington-based Community Nutrition Institute.

Becker said that if the ceiling is not raised, the government will have to cut benefits across-the-board. The average monthly benefit of $35.50 (about 30 cents a meal) would have to be reduced to $28.60.

Instead, Carter wants Congress to trim $700 million from school feeding programs. Savings would come from a nickel-a-day reduction in the subsidy for school lunches (or about $9 a year per family) and lowering the income eligibility standards for free and reduced-price meals for children of families at or slightly above the poverty level. Other savings would come in cuts in special milk and summer feeding programs.

Foreman and other administration backers say the Carter plan would save money in nutritional programs that benefit mainly middle- and lower middle-income families, and retains the benefits to the poor through lifting the ceiling in the food stamp program.