The only option that makes sense to me is that Wakandans can go out and help the world, as long as they don't betray the country's secrets.
There are two examples of this as seen in Black Panther:
N'Jobu, T'Challa's uncle, lives in the United States for presumably over a decade (judging by the age of his son), it's likely much of this time was spend providing honest aid to poor neighborhoods before he started selling vibranium to Klaue to finance revolutions.
Nakia is working undercover to help free some kidnapped women before T'Challa drops in on her, later T'Challa asks her to stay in Wakanda and she refuses.
It's also mentioned later in the film that Wakanda has many undercover agents all over the world.
The main issue that comes up isn't that Wakandans aren't helping, but rather that they aren't making use of their massive technological and mineral resources to either help everyone in need or conquer the world (depending on who you ask).
So, if the Wakandans killed in Civil War always insisted that they came from a third-world country and didn't use any of their homeland's technology or vibranium to further their goals, then presumably Wakanda would see no problem with their humanitarian efforts.
It's also plausible that these Wakandans, like N'Jobu or Nakia, were working undercover. Possibly they were in Lagos for the same reason as the Avengers. After their highly publicized deaths, maybe 'they were aid workers, the Avengers need to be stopped' was the perfect cover story to shift the world's attention away from the secretive nation.