As long as the Aer Lingus flight is both marketed (flight number starts with EI) and operated by Aer Lingus, then you will earn Alaska miles.
Be careful that your Aer Lingus operated flight is also marketed by Aer Lingus and not an American codeshare. They are not part of OneWorld so an American coded EI flight would earn you nothing on Alaska.
You also have to cross check the fare code on the Mileage Plan site to see how many Alaska miles you would earn.
I'm also frankly surprised that AA is willing to sell you an EI flight operated by AC.