The Reagan administration has mounted an eleventh-hour effort to strip from pending Senate trade legislation a provision that could give a handful of sugar refiners more than $300 million in rebates on import duties.

Agriculture Department officials, scurrying to line up support for a move by Sen. John H. Chafee (R-R.I.) to kill the provision, warned that its inclusion in a final version of the trade bill would increase chances for a veto.

"He thinks it's terrible," a Chafee spokesman said. "His biggest problems are that this provision was sneaked through the Finance Committee without hearings and was sold as a mere extension of the current program. We have no business providing this assistance to these big companies."

Under law, in effect since 1982, refiners pay a duty on raw sugar imported for processing but can recoup the payments when they export their refined product into world markets. The trade bill would allow them to recoup duties paid between 1977 and 1982.

"One of our problems is that the Customs Service cannot verify how much was paid during that period," an administration official said, "because the drawback provision was not in place. We think it will cost more than $300 million, which is unjustified and sets a bad precedent for the drawback."

The administration's calculations were based on data submitted by three refiners -- Amstar Corp., Imperial Sugar Co. and Savannah Foods & Industries -- claiming they had paid $264 million in duties between 1977 and 1982. Claims by other refiners were expected to push the total to around $365 million.

But the refiners, backed by a coalition of sugar, labor, food industry and consumer groups, contend that the rebates are a life or death issue. The House trade bill contains help for them; in the Senate, they've lined up Daniel Patrick Moynihan (D-N.Y.), Barbara A. Mikulski (D-Md.), Alfonse M. D'Amato (R-N.Y.) and Louisiana Democrats J. Bennett Johnston and John Breaux as their champions.

"If we don't get this, we won't do any more exporting because of subsidized competition from the Europeans," said Nicholas Kominus of the U.S. Cane Sugar Refiners. "At least one more refinery would close -- and we have shut down eight of them since 1981 and lost a third of our refining capacity.

"Our support includes our old enemies and our old friends," he added, "because they all realize something has to be done. Their concern is that we'll have no refineries left in this country if this situation continues."

Kominus said his group, a frequent friend of the administration's fruitless efforts to curb the federal sugar support since 1981, had finally lost patience with the White House and Agriculture Department. "We've become the whipping boy and they've dumped all over us," he said.

As the administration focused on sugar, a few farm groups worked quietly to try to derail another amendment that they said could devastate U.S. farm export sales.

The amendment, pushed by Sens. Lawton Chiles (D-Fla.) and Robert J. Dole (R-Kan.), would ban from U.S. waters any ship that has called at a Cuban port within the past six months. Among commodity sales that could be strongly hit by the amendment would be wheat from Dole's home state.

Sens. Tom Harkin (D-Iowa), Joseph R. Biden Jr. (D-Del.) and Max Baucus (D-Mont.) were poised to fight the amendment, which Harkin has characterized as the Bob Dole Grain Embargo Act of 1987