To the best of my knowledge, a foreign airline is obliged to comply with the regulations of their state of registry (or state from which the AOC is issued), but is not 'a priori' required to comply with operating regulations of the state to which they are flying, with obvious exceptions for things like altimeter setting procedures and so forth.
Most countries (Europe, North America, etc.) keep an eye on the safety standards of foreign carriers through observation - notably ramp visits - and will take action on an exceptional basis if concerns are found.
Michael