Hi Kelly,
Thanks for your replies. I cannot share the layer publicly. The layer was published from a non-geodatabase SQL Server table. The table has a unique ID column, and when the layer is published to AGOL, this unique ID column seems to be removed. If I import the layer into ArcMap as a shape file then publish, the unique ID column is kept in the AGOL layer, and I can enable attachments on it. So it seems to have something to do with this unique ID column being removed when published directly from the SQL database.
If this database was a GeoDatabase with GlobalID's I wonder if that would make a difference?
I did contact support and am awaiting a reply.