Can the president preemptively pardon someone?

President Trump appears to be still considering a plan to shut down the southern border. During his trip to Calexico a few weeks ago, he reportedly told the now acting head of Homeland Security that he would pardon him if he were sent to jail for ordering border agents to turn back asylum seekers. The White House has denied those reports.