What is the earliest level that a player character (PC) can gain the ability to become invisible without the aid of external items/scrolls/etc.?
Yes, you remain invisible.
The text states:
When you are in an area of dim light or darkness, you can use your action to become invisible until you move or take an action or a reaction.
We can break it up to determine how it works.
When you are in an area of dim light or darkness, you can use your action to become invisible
This is the only condition that must be met for you to become invisible. If you are in dim light or darkness, and you can take an action, you can become invisible full stop.
until you move or take an action or a reaction.
These are the only conditions that cause you to lose invisibility. The invisibility ends when you either move, take an action, or take a reaction. Transitioning from dim light/darkness to full light is not moving, taking an action, or a reaction, so the invisibility remains.
If you're worried about this being overpowered, remember that in 5E invisibility is not that useful by itself. It doesn't actually make you any stealthier or harder to detect than normal. The only thing it does is give people disadvantage against you (which is powerful no doubt), and it allows you to hide in plain sight. However, hiding is an action, which according to the text you quoted removes the invisibility. Since your Warlock can't hide without losing his invisibility, he will still be detectable by everyone around him. All this lets your Warlock do is get disadvantage on attacks against him as long as he doesn't move or take actions/reactions.
tldr: with infinite money, it's trivially possible to cast a spell every round that you're not sleeping, eating, preparing spells, or "etc."-ing
Note: there are (24*60*10=) 14400 rounds in a day, if you don't need to sleep/eat/prepare spells/etc.; 13800 if you need the hour to prepare spells, but don't need to eat/sleep/etc.
To start, let's assume that the character will have an 18 Wis before racial modifiers (either by rolling well or ignoring all else during point buy, possibly by selling off some other stat).
Wis: 18; Bonus 1st-level spells: 1; Total 1st-level spells: 2
Next, race. There are several races that grant a bonus to Wis, but none of them give more than a +2 (which brings our Wis to 20, giving us an additional bonus spell, for 3 total 1st level spells per day). But, there are rules for creating races! Paragon grants a +4 bonus to any one stat for 1 Race Point, and Advanced Wisdom grants a (stackable) +2 bonus to Wis for 4 RP, plus one for each additional time it's taken (9 RP for a +4, etc.). Gnome Magic grants 1/day Speak with Animals (a 1st level Druid spell) for 2 RP, or Spell*-Like Ability, Lesser* grants a 1/day spell as a spell-like ability for one RP, and can be taken three times. Stoneseer (2 RP) grants Magic Stone. Spell-Like Ability, At-Will grants "a 3rd-level or lower spell that does not attack a creature or deal damage" as an at-will spell-like ability (so, our Druid could cast Speak with Animals every round).
A Drow (noble) is 41 RP, so let's assume that's the cap on Race Points (generous by nearly any definition). Let's also assume that the spell-like abilities don't count as casting a spell. So, create a Paragon (1 RP) creature with Advanced Wisdom as many times as possible with 40 RP, which is 6 times (for 39RP). This leaves one RP over for whatever you'd like to do with it. Six +2 bonuses on top of one +4 bonus works out to +16 on top of the base 18 we "rolled", so we have a total of 34 Wis.
Wis: 34; Bonus 1st-level spells: 3; Total 1st-level spells: 4
Mind, those 4 spells will be nigh impossible to save against.
Without magic items, it's "easy" to get to 4 spells per day.
But wait, there's more: with infinite money comes magic items!
Wis: 45; Bonus 1st-level spells: 5; Total 1st-level spells: 6
Tome: 137,500 gp Headband: 36,000 gp (note: the GP cost for magic item guidelines/rules theoretically allow for items which grant an enhancement bonus of greater than +6, so this could go as high as your GM will allow. However, we're at a 45 Wis, which is as high as the table goes; while it's easy enough to extrapolate, let's assume that's the limit of the GM's leniency.
Without cheesy magic items, it's "easy" to get to 6 spells per day.
The next obvious purchase is several thousand Pearls of Power (at 1,000 gp each), each of which (as a standard action) returns a cast spell to mind. Thus, aside from needing to eat, sleep, and prepare spells (which these may obviate), a Druid could cast a spell every other round, or (14400/2) 7200 spells per day, plus the 6 spells they can cast normally.
This dovetails nicely with several thousand Metamagic Rods of Quicken (lesser, at 35,000 gp each), which lets you automatically cast 3 spells per day as with Quick Spell (as a swift action). If you have the slots, you can cast another spell that round, but you'll be using those standard actions to recall spells via the Pearls.
The Pearls have a weight of "negligible", so (per RAW) you can carry them all in a handy sack or have them sewn into your clothes; the rods are 5 lbs each, though; carrying those around might become problematic, except for the Handy Haversack (2,000 gp), which will carry 24 (each of which can be removed as a move action) (or the Secure Paypack, which can hold 4 more) and possibly the Efficient Quiver, which may be able to hold 6, 18, or 60 rods, depending on your GM; they can remove from the quiver for free. Still not enough for full casting; a lenient GM may allow for a larger Haversack or using the Magic Item Creation Rules to let you bolt dozens of rods together into one "Metamagic Rod of Quicken, Ultimate". The fall-back here would be a Portable Hole with a Golem or Homunculus or even an Undead of some sort to keep handing you fresh rods and put your spent ones away for the day.
With cheesy magic items, it's straightforward to cast one spell per round all day long, plus a couple of rounds of casting two spells.
The Vibrant Purple Prism Ioun Stone (at 36,000 gp) gets you 3 spells per day every even day, at the cost of those same three spells on the odd days. Ditto for a Ring of Spell Storing, Major, except that it's 10 levels. Of course, you can have 2 such rings and as many Ioun Stones as you can afford, so you could cast 14400 spells every 1,440 days (a hair under every 4 years). Staves can do something similar, letting you cast 10 more spells today at the cost of having one fewer for the next 10 days (noting that you can only recharge one staff per day, and only one charge, so getting more than one staff just increases the time you're short a spell slot).
With cheesy magic items and no help, it's easy to cast two spells per round all day long, as long as you only need to do so once every leap year or so.
I'll note here the Silver Spindle Ioun Stone, which grants 3/day "pick a spell at creation" as a spell-like ability; again, though, I won't use it, since it isn't casting a spell (costs 24,000 gp, though).
Again in the "spell-like ability" camp is Major Spell Expertise, which lets you cast twice more per day, but as SP instead of "casting a spell" (which, if you're a Human, or burn 4 RP on your custom race to take Flexible Bonus Feat, you can take twice, at the cost of +2 Wis, which will drop your bonus spells per day by 1, but which is still a net win - and lets you buy other niceties for your custom race).
Allowing for "cast spell X as a spell-like ability" magic items, it's simple to cast one spell per round, but it doesn't stack well with the "Pearl + Rod of Quicken" cheese above.