The Senate yesterday began debating a massive trade bill as 21 senators delivered opening statements on the legislation designed to end five years of record trade deficits and to improve America's competitive place in the world.

Majority Leader Robert C. Byrd (D-W.Va.), who has called the trade bill his number one legislative priority, warned senators to expect late night and Saturday sessions this week. As a result, a number of senators canceled plans to go to an interparliamentary meeting in Cancun, Mexico.

In its first roll call vote, the Senate late last night defeated, 69 to 27, an amendment whose passage was seen by Senate trade specialists as signaling that the bill was set on a highly protectionist course.

The amendment, sponsored by Sen. Arlen Spector (R-Pa.), would have allowed U.S. companies to go to federal court instead of the International Trade Commission to stop other countries from dumping products in the United States at less than their fair market value. It also would allow companies to sue for damages caused by the dumping.

It was opposed by Finance Committee Chairman Lloyd Bentsen (D-Tex.), who said it would take U.S. companies longer to get relief in the courts than from the ITC. Sen. Bob Packwood (R-Ore.), ranking minority member on the Finance Committee, said the measure violates international rules governing trade.

Earlier, Sen. Ernest F. Hollings (D-S.C.) announced that he and Sen. Strom Thurmond (R-S.C.) decided not to attach a textile quota bill to the trade measure. They did this after Bentsen assured them the Finance Committee would allow a floor vote later this year on the textile measure. There had been concerns that the supporters of the textile bill would stage a filibuster to block passage of trade legislation unless it contained their measure.

The trade bill, produced by nine Senate committees, aims at opening other countries' markets to U.S. exports by strengthening unfair trade laws. It would limit the president's power to avoid taking retaliatory action in trade cases involving products traded both fairly and unfairly, make it easier for industries to win import relief through unfair trade cases and allow the imposition of a tax on imported oil.

There were 125 amendments offered on the bill, which was so thick that it was held together with a rubber band instead of being bound with staples.

"It does not take a foot of legislation . . . to give the president the power to proceed with the Uruguay Round" of talks to improve the international compact that governs world trade, the General Agreement on Tariffs and Trade (GATT), said Sen. Daniel P. Moynihan (D-N.Y.).

Moynihan, who supported the largest piece of the legislation when The bill "is not some magical cure-all for everything that ails the international trading system."

-- Sen. Lloyd Bentsen

it won approval in the Finance Committee on a bipartisan 19-1 vote last month, said the negotiating authority for the new trade round is the most important element in the bill.

Bentsen acknowledged that the legislation "is not some magical cure-all for everything that ails the international trading system."

But he said it is necessary to redress major losses in the U.S. international economic position, adding, "We cannot finesse our high-tech trade deficit or hide the fact that we are no longer the world's largest exporter."

"We can't duck questions about America's future ability to compete in world markets. . . . In the short period of four years, America ceased being the world's number one creditor and became the greatest debtor nation in the history of mankind," he said.

Moynihan blamed the U.S. decline on "vast budget deficits that were deliberately created by this administration" to shrink the federal role in the economy and to end government social programs.

Packwood said he supports parts of the bill that would require the president to retaliate against unfair trade tactics that violate agreements and that grant authority to negotiate the new trade round.

But he warned that sections of the bill that would require presidential action on behalf of industries suffering as a result of a surge in fairly traded imports would protect special interests at the expense of the economy as a whole.

That provision is one that the Reagan administration said would draw a veto.

Sen. John C. Danforth (R-Mo.) said Congress has a little better than 50-50 chance of passing a bill President Reagan will sign.

"This bill is going to be difficult to pass," he said. "It is a tightrope walk" between "following free trade to a fault" by keeping U.S. markets open while others are closed and the other "extreme" of special interest protectionism.