Emergency legislation to spend $7.4 billion for unemployment benefits, agricultural loans and heating assistance for the poor passed both houses of Congress yesterday.

One of the bills, to increase the borrowing authority of the Commodity Credit Corp. by $5 billion, prompted spirited debate over whether the CCC should pay off Poland's debts to U.S. banks. The United States should send a message that "there are things we will not do to bail out the military dictatorship in Poland," argued Sen. Daniel Patrick Moynihan (D-N.Y.).

Moynihan's amendment, to require the president to report formally to Congress and explain when loans are paid off without declaring Poland in default, was defeated 55 to 39. Sen. Charles H. Percy (R-Ill.) said that declaring Poland in default would merely cause it not to honor its debts, whereas it is paying off part of its obligations now.

The supplemental appropriations also included $1.5 billion for the Unemployment Trust Fund, which is running out of money for compensation claims in a year of extraordinarily high job loss; $210.5 million for job assistance offices which have been closing in several states since last year's budget cuts; $500 million for extended benefits; $133 million for staff to process claims, and $123 million for fuel aid to low-income families, a program which was also cut last year.

The administration opposed the fuel aid bill, which helps pay the heating bills of the poor, but Sen. Edward M. Kennedy (D-Mass.) rescued it by attaching it as an amendment to the CCC bill. If the CCC bill had not passed yesterday before Congress recesses this week the corporation would have run out of money to lend to farmers, who have been borrowing at unprecedented rates due to large crops and low prices.

In passing the fuel aid bill, which brings the total assistance program to $1.87 billion this year, the Senate cut out a House provision to prohibit states from issuing any fuel grants after May 31. Although the program is primarily designed to pay the heating bills of poor people, at a time when fuel prices have risen 20 percent and the winter has been abnormally cold, Sen. Lloyd Bentsen (D-Tex.) argued that the money should be available for air conditioning since "heat kills just as surely as cold."