Mr. Wajngarten also stopped by the birthday party of Kimberly Guilfoyle, an adviser to Mr. Trump’s re-election campaign and the girlfriend of his eldest son, Donald Trump Jr., a campaign aide said. Mr. Trump also attended the party.

But the White House press secretary, Stephanie Grisham, played down Mr. Trump’s level of exposure. “Both the president and vice president had almost no interactions with the individual who tested positive and do not require being tested at this time,” Ms. Grisham said in a statement on Thursday.

She also indicated that neither Mr. Trump nor Mr. Pence intended to self-quarantine as a precautionary measure. “There is currently no indication to test patients without symptoms, and only people with prolonged close exposure to confirmed positive cases should self-quarantine,” Ms. Grisham said. “Exposures from the case are being assessed, which will dictate next steps.”

While the White House has indicated that its bar for testing the commander in chief is high, Dr. Judith N. Wasserheit, a professor of global health and medicine at the University of Washington in Seattle, recommended otherwise. “Because of the critical roles that the president and vice president play, it would be wise to have a low threshold for testing regardless of symptom status,” she said.

Dr. Thomas File, the president of the Infectious Diseases Society of America, said that anyone within five feet of an infected individual for five minutes or more had potential exposure to the virus. The recommendation for someone who had exposure would be to “stay home and monitor themselves” for 14 days, Dr. File said. “If they develop symptoms, they would be tested.”