Some Republicans also rejected Mr. Trump’s suggestion, an indication of the political risks for the party that attend the president’s bid to stoke anti-immigrant sentiment in advance of next Tuesday’s voting.