From the Basic Rules:
In combat, most creatures stay alert for signs of danger all around, so if you come out of hiding and approach a creature, it usually sees you. However, under certain circumstances, the Dungeon Master might allow you to stay hidden as you approach a creature that is distracted, allowing you to gain advantage on an attack before you are seen.The rules make it pretty clear if you're visible you're spotted unless the DM rules otherwise. Not that you're unseen unless the DM rules otherwise. The DM always has to allow you to remain hidden.
I'm not sure how the rules could have been more clear that it's the DM's call.
That rule is very specific to approaching a creature.
By RAW a Rogue can hide behind a barrel each round, and provided his stealth check is high enough (very likely), he gains advantage on that attack. Over and over.
Most DMs choose to house rule that, and that's a good indication for a candidate for errata.