If the other person just sleeps on the floor or together with you in your (single) bed, you can just have them “sneak in”, most likely no-one will notice or care as long as you don't cause any noise or other complaint. It depends on the hotel. Some rent the room at a flat rate and others charge by the person.