Mayor Adams of New York, a Democrat who has taken pains to ally himself with President Trump, said his administration was “assessing the full reach” of the directive.