It's perfectly legal, and it is very much a regular occurrence.
David Suzuki Foundation at some point received over 50% of its funding from foreign sources.
Quite honestly, the common attitude around this whole foreign funding is "I don't want foreign money funding causes I personally don't like".
Everyone is an internationalist, until that becomes personally inconvenient, in this case politically.