It seems that you were carrying it. And it was going on the plane. That seems to make it a carry-on to me.
This appears to be another case of inconsistently policy enforcement causing confusion.
Yes, if you want to wear two suits at the same time, you could get around it