Yes, a DM can do whatever they want. They can allow or disallow any rules, classes, and whatever else as they see fit.
BUT that doesn't mean players have to like what they do, and being a total cunt of a DM is a good way to have your players quit and your campaign fall apart. Yeah, you can be smarmy about it and think "Whatever, they can go find another DM to baby them", but you are still letting potentially hours and hours of writing and preparation and DM work YOU have done go to waste. I really don't think that's worth it just so you can get the last word in.
D&D is a cooperation between DM and players. If the DM wants a real strict game and the players don't, then there will be problems. Or it could be the reverse - the players might want a really strict game and see how far they can get, and the DM is maybe just handwaving lots of stuff and breaking the rules the players wanted to be followed, and so on.
There is nothing objectively wrong with 100% RAW, allowing every homebrew imaginable or anything in between. What's important is that players and DM are on the same page with regards to how closely the rules be followed. If you want no homebrew, just tell your players that immediately when you're getting the game together. "Alright guys, for this game I wanna keep things simple, so I don't think we'll do any homebrew, let's stick to the official books." And if they're not cool with that, then they don't have to play and you don't have to DM for them, and that's just how the dice ended up rolling. The end, move on. You've either found players willing to play with your rules, or you haven't.