The bill, which has divided Democrats, would require law enforcement to detain noncitizens who commit primarily theft-related crimes.