When we were on RCL and lanyards weren't "cool" I found it generally worked to just carry it in my pocket. But I wear shorts - on the occasions I wore a dress, it was usually for dinner and my husband was with us, so he carried it in his pocket (stupid men always getting to have pockets...). I didn't have a problem the whole week - hanging out by the pool, I'd toss it in my book, etc. It didn't end up being that big a deal, which I thought it would be.
I used to have an awful pair of dress pants without pockets when I worked at a key-card accessible building, and used a retractable clip on my belt loop. That would be another option - any place that sells scrubs will have them.