“He is usurping congressional authority,” Senator Susan Collins of Maine, a veteran member of the Appropriations Committee, said in an interview. “If the president can reallocate for his purposes billions of dollars in federal funding that Congress has approved for specific purposes and have been signed into law, that has the potential to render the appropriations process meaningless.”

Several other Senate Republicans publicly and privately joined Ms. Collins in describing the move as a flagrant breach of congressional jurisdiction and a dangerous precedent. Their numbers raised the clear possibility that enough Republican defectors could join with Senate Democrats to provide a majority to disapprove of the president’s decision should the opportunity arise.

Four Republicans might be enough to join with Senate Democrats and pass legislation rebuking the president, and leadership aides put the number of potential defectors as high as 10. But the unrest seemed well short of the sort of partywide revolt necessary to override a veto by Mr. Trump of any legislative attempt to prevent his declaration of an emergency, leaving a legal challenge as the only recourse.

“I would not vote for disapproval,” said Senator Richard C. Shelby, Republican of Alabama and the Appropriations Committee chairman who led the spending negotiations. “He’s got the power to defend the country, to defend the borders, to protect the people as commander in chief. I believe the courts would uphold him on this.”

Despite reservations about many of the actions taken by Mr. Trump and the White House over the past two years, most congressional Republicans have been reluctant to put too much distance between themselves and the president given his grip on Republican voters, many of whom consider the wall a national necessity. Mr. Trump exerts a powerful hold on his party, and lawmakers are cowed by the belief that opposing him will end in their political destruction.

Still, the emergency declaration was a direct assault on the ability of lawmakers themselves to restrain the president, and it raised expectations that more could balk at what was widely viewed as a serious case of executive overreach.

“Somebody is going to have to say enough is enough,” said Trent Lott, the former Senate leader from Mississippi, who questioned the wisdom of the move.