WASHINGTON—White House officials are divided over whether President Trump should declare a national emergency to obtain funding to build a border wall and end a partial government shutdown, but were exploring how the president could divert funding if he decides to do so.

The White House has asked the Army Corps of Engineers to examine potentially diverting money from other projects to pay for the wall along the U.S.-Mexico border, if Mr. Trump does decide to declare a national emergency. The administration is also exploring...