Basically, DMs should honor the official D&D books' rules. Any changes to a class or race can be changed as needed.
For example, Unearthed Arcana such as the Revised Ranger can be used as the PHB Ranger is underpowered.
Even homebrew reworks can be used provided you let the DM review said rework; a good example of a rework is the Sorcerer Rework now in the codex.
Lastly, any homebrew content whether it be a class, race, item or etc. will be up for review and approval by the DM.
PHB is the gold standard if you are a player!
First expansion to the core rules and mechanics
Upcoming second expansion to the core rules and mechanics
DMs will be using the DMG for other rules and mechanics important for DMing games
P.S. You don't need to buy the books. You can get a help from our players and the DM in which where to find sources for such files. ;)