A dog can be left in a room for a few hours at a time, depending on their age and training. However, it is important to provide regular breaks for exercise, bathroom breaks, and interaction. Always ensure the room is safe and comfortable for the dog.