President Carter has agreed to ask Congress to raise the floor price on this year's cane and beet sugar crop by 5 percent in an effort to break a two-year farm policy impasse that has been politically expensive for his administration.

White House aides said the president is aware that the decision could be criticized as inflationary but that he views it as necessary to strengthen congressional backing for crucial legislation such as a new trade package.

The decision, made just before Carter left for Mexico, is to ask Congress to pass a bill guaranteeing a market price of 15.8 cents a pound through the use of fees, duties and standby quotas on imported foreign sugar.

The current market price of around 15 cents a pound is maintained by a government price support program.

In addition to the increase in the minimum price for sugar trading under the plan, the administration's bill may include a half-cent-a-pound government payment to raise the price farmers get to 16.3 cents a pound.

The overall impact would be to increase the nation's sugar bill by $200 million to $250 million, government economists said.

Sen. Frank Church (D-Idaho), a leader in the fight for higher sugar price floors, yesterday called the administration's decision a "break-through" that "greatly increases the chance that Congress will be able to complete legislation soon on a sugar bill."

Nevertheless, Church's aides said he plans to introduce next week a bill that would raise the floor to 17 cents a pound.

New sugar legislation will have to move through the Senate Finance Committee chaired by Sen. Russell B. Long (D-La.), the House Agriculture Committee chaired by Rep. Thomas S. Foley (D-Wash.), and the House Ways and Means Committee chaired by Rep. Al Ullman (D-Ore.).

All three chairmen have cane or beet constituents who have been asserting that they cannot produce sugar profitably at current floor levels.

In addition, Long's and Ullman's committees will have jurisdiction over the expected trade bill, a measure that will have sweeping economic impact on many industrial and agricultural sectors. The United States and other nations are nearing agreement on a trade pact in Geneva.

White House aides said yesterday that these political considerations helped sway Carter away from the position he held in the last two years against increases in sugar floor prices.

The House last year voted down a Senate sugar bill with a price floor of 15 cents a pound. The U.S. sugar industry since has been operating under an amendment to the 1977 farm legislation. This amendment, which relies on price supports, expires Oct. 1 and domestic sugar growers who are deciding how much cane and beets to plant have been pressing for an indication of prices they can expect for the new crop.

Carter's decision to support the highest of three options presented to him was preceded by intense debate within the high levels of his own staff.

Alfred Kahn, his chief inflation fighter, was at one point adamantly opposed to an increase, sources said.

Pushing for a compromise to break the long impasse were White House congressional liaison Frank Moore and chief domestic adviser Stuart Eizenstat.

The lowest option called for holding the line at about the present floor level. The other option would have raised the floor to 15 1/4 cents a pound and added a direct payment to farmers.

A bill introduced yesterday by Foley and Ullman would raise the guaranteed price on sugar from the 1978 crop to 15 1/4 cents a pound and to 16.1 cents a pound for this year's crop.

The current world price is around 7.9 cents a pound. The United States imports 4.5 million tons of its annual 10.5 million tons of sugar requirements. The price of the foreign sugar is forced up to domestic levels by the levying of duties and fees.

Church has refused to hold hearings on an international sugar pact to stabilize world prices until Congress passes a sugar bill satisfactory to Idaho beet growers. One large beet sugar refining company with plants in Idaho and in Foley's district in eastern Washington has put its processing facilities up for sale after asserting it cannot stay in business at present prices.