A small group of U.S. national security officials has been quietly advising state governments and congressional lawmakers on how to prepare for the possibility that the Trump administration may try to interfere in November’s midterm elections, according to people involved in the effort.