Not in a permit aircraft and only from licenced aerodrome. Otherwise OK if pilot receives no money at all and the benefitting organisation really is a registered charity.
There's more to it than that, anyone proposing to do this must read the full rules.