Warning to use 19th century law comes as president faces legal setbacks in efforts to put soldiers on streets of US cities