Ten Republicans voted alongside Democrats, in a rebuke to the Trump administration’s immigration policies. Should it pass the Senate, the White House said President Trump would veto the measure.