That seems unsupported by the article, in 2015 Ireland changed its laws, Apple consulted a law firm on advice on how to proceed and sought assurances from the govts involved that it's understanding of the law was correct.
Of course there is, this is what tax evasion is about. There's a decent case to be made that the Apple and Ireland were wrong in Apple following Ireland's tax code, we'll see how the case turns out on appeal.
I would say that when the sovereign is in agreement the payment of taxes that it can't be construed as evasion, however, I'm not super well versed on how much of a sovereign Ireland really is given it's membership in the EU. Perhaps the EU is the real sovereign in this case and Apple has erred in consulting with the Irish government who lacks authority to set tax policy in its territory.
Where is this agreement you speak of?