Question: Several times in the movie one character is able to ascertain in which hotel room another character is staying simply by asking the front desk for the room number. Was this realistic at the time the movie was made? Today, a hotel would never divulge a guest's room number to a stranger, since such information could potentially be used by burglars and/or predators to gain access to hotel rooms. Was security really that lax in the 1950s?
Answer: Yes, security was that lax in the 1950s and beyond. People could acquire all kinds of information about individuals from various types of businesses. Not all were so careless, but many were or they naively didn't see a concern. In the late 1980s, I was a student at a university where a non-university person obtained his ex-girlfriend's class schedule simply by requesting it in-person from the registrar's office. Using that information, he was able to locate and fatally shoot her on campus.
Answer: Not really. You could (and at some hotels are still able to) keep your room number private or you could not - i.e. you could ask the hotel staff to keep your number secret from strangers, or you could ask them to tell anyone who might ask. Not having seen this movie, I don't know how likely it would be in the situations you speak of that the hotel guest would choose the latter option- it might be a mistake.
Blibbetyblip