More and more hotels require a keycard to go up in the elevator, a decade ago that was highly unusual but now every time a hotel gets remodeled they change to keycard access required to use the elevator. I always tailgate anyways but some elevators like the Ritz Carlton will only go to certain floor. It's always a good idea to call the hotel and find that out directly.
Restrictions on hotel guests are non existent in the USA as pointed by @MscleLovr but nowadays because of Covid-19 some hotels might required only registered guests to be allowed on the premises or will ask visitors to be picked up downstairs by a guest.
I would call and find out, unless you can read the fine print, warnings, etc.