It does seem like e.g. the US could impose this unilaterally. You, a company, have to make two tax returns: one on all the money you made here, and one on all the money you and/or your relevant "parent" corporation made elsewhere. Same rules to calculate taxes in both cases. On the latter return, you can subtract the sum of the taxes you paid elsewhere from the tax owed. The rest belongs to the US government.
At that point there'd be no point in a country offering cut-rate taxes to any corporation that does substantial business in the US, because taxes on any profit realized internationally will still be collected. It's just that the US is taking them rather than the country that's offering the cut-rate tax deal. So that country (Ireland or whoever) no longer benefits from having low corporate taxes, and they might as well have taxes at least as high as those in the US.
It seems like any sufficiently important country or union could impose a rule like this if they wanted to. There must be some facet of international law that prevents it, or some other complexity to the idea that I'm missing.