From a legal stand point there is no difference between entering your home, apartment or rented motel room. All rules and laws apply as does the expectation that you would be free from unreasonable search and seizure of your residence. The fact that your "residence" is a motel room makes no difference in the eyes of the law. A search warrant would be needed to forcibly enter the motel/hotel room.
Here is the real world application of this conundrum:
Many motels/hotels will cooperate with law enforcement; however, motel management is not obligated to do so unless there is a warrant or court order involved. Police cannot legally ask motel management to get the bolt cutters to cut the inner security lock to the room; however, I have seen hotel managers do this very thing to allow police access to a room. The problem is that the motel/hotel now opens themselves up to legal liability from the person who is apprehended.
An experienced police officer will generally try to gain entry into a motel room by knocking on the door (with the authoritative voice saying"Police! Open up!). Most inexperienced individuals will hear that it is the police and simply comply because they think they have to. Once the door has been opened the police can then legally gain entry. Anything found in the room would then be admissible evidence. Any police officer that enters a motel room without the consent of the resident runs a huge risk of having any evidence found in the room being thrown out of court due to an unlawful search if there is no search warrant.
With many motel rooms now controlled by key-card access, management can now lock people out if they overstay or do not pay their bill. Even with the implementation of this technology, if the person stays in the room beyond their scheduled stay management cannot legally throw them out (interesting, huh?). In these cases there are usually several individuals in the room and someone always stays in the room to let the others back in when they return. Motels/hotels have to go through the same process of evicting someone as you would with an apartment...3 Day Pay or Quit and all the other stuff. Since most people do not know this they leave the room and are locked out and cannot get back in. For those who know how the system works they can actually stay in the room for weeks if not months until legally evicted.
In a situation where the person may be confused and voluntarily open the door for the police, the police can argue that they were invited into the room. Having been "invited"they are free to search the room for drugs or any other illegal activity.
If you had a situation where there was a warrant for arrest, if the person looked out the window and was recognized as the perpetrator by LEO (law enforcement officers) they could legally break the door down since there is a warrant for their arrest. If local LEO conducts a DMV check of plates in the parking lot and sees a warrant for a known felon, it could be argued that they had a legal right to get the motel registration information from motel management to apprehend the perpetrator.
Laws differ for each State on this law, please consult an attorney in your state if you have further questions.
Here are some interesting links to articles pertaining to this issue: