She is contributing to the Trump administration’s mixed signaling, participating in a ceremonial donation of over one million textbooks in Malawi, one of the world’s poorest countries, on Thursday, even as President Trump has suggested deep cuts to foreign aid funding that could supply future donations.

In each country on her visit, Mrs. Trump has seemed at ease, and perhaps happy to be out of Washington. She has posed for photos with babies and children, often murmuring the same things at each stop — “Beautiful!” and “Hi, guys!” — while holding their hands or waving at the cameras. And with Washington imploding over a battle to confirm Brett Kavanaugh, Mr. Trump’s nominee for the Supreme Court, Mrs. Trump seemed free of the usual scrutiny that nips at her stilettos in Washington.

On Friday, she looked happy as she visited a red clay feeding pen for orphaned elephants at the Nairobi National Park. She administered them formula in oversized baby bottles, patted the animals on their heads and inspected their floppy ears. Mrs. Trump, a former model who is poised and hypersensitive to the criticism she receives for putting one toe out of place, wore a pristine white shirt to see the elephants. She emerged without a smudge.

After the elephant feeding, she added the pith helmet to her outfit, and social media began to light up. As the first lady sat alone in her vehicle, peering through binoculars and shooting photos of zebras, giraffes and impalas on her iPhone, critics were parsing her decision to wear the attention-grabbing white hat.

“It’s like showing up to a meeting of African-American cotton farmers in a Confederate uniform,” Matthew Carotenuto, a coordinator of African Studies at St. Lawrence University, wrote on Twitter. “Historical context matters.”

Beyond hosting first ladies at the White House or meeting with them at the United Nations, it is unclear how much Mrs. Trump knew about Africa before she decided to visit. Throughout her trip, observers have been trying to read the reasons behind her journey, searching for clues that might place her in studied opposition to her husband’s harshly leveled stereotypes about African nations.

But Mrs. Trump’s seemingly small decision to wear the helmet appeared to show a similarly limited understanding of the places she’s been this week, argued Ms. Dionne, the political science professor.