Not a tiny family-run business, perhaps, but any normal hotel, yes of course you can leave whenever you like.
When you check in, just mention 'By the way, I have an early flight tomorrow morning, so I'll have to check out at 3. Will there be any difficulty with that?'
That way, if you have to pay as you leave, they'll have your bill ready at the desk.
But more and more hotels ask you to pay as you check in, so when you leave you only need to drop your key or keycard at the desk and say 'Checking out - room 568 - goodbye!'