SS
I don't think there is any way that any ICAO member state can prevent a resident of the state from flying in an aircraft registered in state X on a licence/rating issues by state X, on a casual visit.
Think of a case where an inbound B747 from some US airline has a captain who is actually a UK citizen. Quite feasible.
If you have a reference to an option under ICAO allowing a state to ban its own citizens flying aircraft registered outside it, I'd be interested.
It's only long term parking that there is control over, potentially.