She said she was apprehensive that her passport could be canceled. “That just makes me nervous anytime someone messes with my passport any way,” Ms. Dillard, a Milwaukee native, said in an interview on Monday. She said she was also considering staying in Ghana.

A spokeswoman at the State Department in Washington did not have an immediate comment when asked about the notice to cancel stranded Americans’ passports.

Senator Robert Menendez of New Jersey, the top Democrat on the Senate Foreign Relations Committee, urged President Trump on Monday to “provide Americans overseas the support that they need” during what he called an “unprecedented pandemic.”

“No American should ever have to worry that they might be abandoned abroad by our government,” Mr. Menendez wrote in a letter to Mr. Trump.

The senior State Department officials said that in some cases, foreign governments had imposed restrictions to contain the virus that prevented American flights from departing.

One of the officials said that had been the case in Peru, where 15 students from Alabama, Georgia and North Carolina who were training to be paramedics and physician assistants were trying to leave.

The official said fewer flights were able to fly in and out of Peru because the international airport in Lima, the capital, had been shut down for the duration of the country’s quarantine. That means flights have had to fly through military airports, which do not have the capacity to manage all the additional air traffic.