The president made the threat after Beijing imposed new restrictions on the export of rare earth minerals, which are vital supplies for U.S. makers of chips and batteries.