Agents were given little notice and conflicting guidance on how to enforce President Trump’s first travel ban last year, leading to chaos at airports.