Everyone (well, so far) agrees that the answer is yes. But I'd like to talk about why and why the different examples you gave matter. Some groups/players/GMs will be fine with some of those and not others.
Consistency is key
That's what rules and canon are really all about. If you look at fandoms like Star Trek with a lot of concern for canon, most of the complaints are essentially about contradictions. If one episode says the show is set in the 27th century and another says it's the 23rd, that's a problem. If one episode establishes how fast the ship can go but then another episode shows the ship going somewhere it couldn't have gotten to in time, that's also a problem, but a somewhat smaller one - in the show. However, in a RPG, that will still be a big problem. Games need to be more precise than linear entertainment because the show must go on, but players can stop and argue for as long as they want.
Some players (and fans) don't really care because their view is local - they only care about what's happening right now and whether that's interesting. I'll call these people "Group A." It might be because they always see the game/show as nothing more than that and simply don't care about consistency, or it might be because they don't like to worry about an ever-expanding set of circumstances that are never going to be 100% perfect anyway. Others care about it a lot because they like a sense of a bigger world that isn't real but could be. They enjoy it when something that happened at the beginning of the adventure has a lasting impact that comes back around later, for better or for worse. I'll call these people "Group B."
Neither style is wrong but it means that if you have players from Group B in your game, you have to be consistent or these players will be unhappy. Group A players will rarely be unhappy when a game is consistent. So when you set up your game, take care that you remain consistent - even if it's just to what you've created yourself.
Make changes that meet player expectations
Building your own world is probably easier than races/classes/abilities. As shown in earlier answers, the GM is expected to make the world their own. But different players will accept different levels of this in different situations. Perhaps in your version of Forgotten Realms, Baldur's Gate was destroyed by a volcano and is now inhabited entirely by undead, and Waterdeep has been conquered by orcs. That would certainly be a major change and Group B players who really like (or at least are really used to) Forgotten Realms might grump about it. At the other extreme, you could worry about whether some particular uninhabited hex on the map has the "right" kind of monsters according to lore, or which specific noble family hates which other specific noble family (unless that's particularly relevant to the plot). Most games fall in between. Wherever you draw the line, once you've established that Waterdeep is now full of orcs, when the players go back it better not be full of giants, or your Group B players will be cranky (unless you've shown that there was some big war between giants and orcs and now the giants have control).
On the other hand, if you don't call this "Forgotten Realms" but just your own world where there's a big city that the orcs conquered, nobody will bat an eye. They might ask what happened to the rest of the country that the city was in, whether there's a royal family in exile plotting to reconquer their territory, whether the orcs are actually manage to run a civilization or whether they've descended into constant infighting because they're orcs, what the neighboring kingdoms or city-states are going to do in response, and you need to have answers ready for all of that (even if the characters don't know immediately). Those answers are likely to form the starting point of your adventures, hopefully. But nobody will complain about the basic premise, because you've started from a blank slate.
And catering to the Group B types isn't just about limitations, either. Lots of players will enjoy figuring out what's going on and it can help the GM too. So to give an example again from my current game - if you have a Yuan-Ti pureblood make an offhand comment that the slaves you just freed would have been happier as snakemen (rather than just serving them) - that's a clue that the snakes are probably brewing up some Yuan-Ti broodguards - which in turn implies that there's probably a brood - and they'll make plans based around this information. When you're consistent with established lore, and have experienced and smart players, you can let the world do your foreshadowing for you. That's great! And also easy, because you don't have to remember everything you ever did, some stuff you can just go back and look up.
When you start making up worlds and races, you can irritate the sensibilities of your players (careful with the Dark Skin Makes You Evil trope cough cough drow, or any other kind of harmful stereotyping/biases that can easily find their way in).
Watch out for mechanics
Races, classes, and abilities are much harder to get right because now you don't just have to be consistent within the story - you also have to come up with working mechanics and that is much harder. If your Waterdeep is full of orcs, it's just full of orcs, okay? But if you introduce a new ability that lets a particular class do 50% more damage than any other (which is most likely to happen because of unintended consequences rather than something obvious), that's broken and everyone who isn't playing that class will hate it. Then you make a change to "fix" it and now the player who is playing that class hates it. It took TSR/WotC until 5th Edition to get paladins right, and now rangers are screwed up instead. If you are planning on making whole new races and classes yourself, you might end up regretting it. Or you might end up creating the next Dragonlance (which started exactly that way). More likely you'll end up with something that basically works, but has some problems and doesn't really "feel like D&D" - to players who care about that sort of thing. And remember that Dragonlance was created by experienced players and GMs on purpose - not to avoid buying rulebooks.
You also have to watch out for munchkin players. Once you start letting homebrew stuff into the game, some players will start coming up with random stuff that lets them break the game and trying to convince you to let them use it. This is no fun for anybody except them. Sometimes this happens even with published material. For example, there is lots of published material (official and otherwise) about how to make monster races into player races. Some players like this because the idea of a half-dragon half-troll half-ogre half-orc werewolf who's also a bugbear with 18 charisma appeals to them. Others... don't, and find that sort of thing to be complete garbage. Know your players!
But all that doesn't mean you shouldn't homebrew at all. One common homebrew in 5th Edition is fixes to the aforementioned ranger class. Another common one is an intelligence-based warlock (rather than charisma as it is in the book). These aren't exactly new classes, but they fix deficiencies in the book as written (stinking on ice in the case of the ranger, and abilities not matching the lore, and weird multiclassing situations for the warlock). Tinkering is easier than starting from scratch!
I recommend looking at sites such as enworld.org, giantitp.com and rpg.net, which all have extensive discussions about homebrewing.
So, to sum up: World yes but remember the pitfalls, everything else maybe sometimes, because you have even more pitfalls.