I just did this on a recent flight I had to MAD that I was uncertain about how Iberia had ticketed my name, so I booked a back-up AA award ticket. I never checked in on the AA flight in advance. I successfully check in with Iberia, then went on the AA app, cancelling at the airport. The miles immediately refunded along with a timely refund of the co-pay.