Note that on the Iberia website you have to tick this box to get a Frequent Flyer option: "Iberia Plus or other frequent flyer card holder". This then gives some drop downs, and though the order is a bit odd, American Airlines is definitely there. However if you are already logged in under an Iberia Plus account then you need to log out. But the process now is indeed to persuade Iberia to remove your existing credits from your account, by calling them up. I don't fancy your chances. On the whole it's better not to put any frequent flyer number into bookings other than the final one you want to use, they have an awkward habit of getting stuck. It took me years to get rid of my AAdvantage number, in the other direction.
The cause of this is that when you make this sort of booking, Iberia creates segments on other GDS apart from their own. We don't see the booking here, but I bet some segments were on SABRE, which has an indirect link to Iberia's systems and it's not sufficient just to update with a new number in Iberia.