I had a cat do this to me once! He got the wrong floor and ran inside my condo after meowing outside loudly. The he got all freaked out because he didn’t recognize anything, and I couldn’t get near him, and he wouldn’t go near the door back outside.
No tags at all, so I bought a disposable litter and locked him in the front bedroom. I was woken the next morning a bit before 7 by the lady upstairs who accused me of stealing her cat. Hey asshole! Don’t let your cat outside, and if you do put some damn tags on it!