All the same, it wasn't what you'd call the perfect end to the day, Harry thought, as he lay awake much later listening to Dean and Seamus falling asleep (Neville wasn't back from the hospital wing). Ron had spent all evening giving him advice such as "If he tries to curse you, you'd better dodge it, because I can't remember how to block them." There was a very good chance they were going to get caught by Filch or Mrs. Norris, and Harry felt he was pushing his luck, breaking another school rule today. On the other hand, Malfoys sneering face kept looming up out of the darkness - this was his big chance to beat Malfoy face-to-face. He couldn't miss it.
"Half-past eleven," Ron muttered at last, "we'd better go."
They pulled on their bathrobes, picked up their wands, and crept across the tower room, down the spiral staircase, and into the Gryffindor common room. A few embers were still glowing in the fireplace, turning all the armchairs into hunched black shadows. They had almost reached the portrait hole when a voice spoke from the chair nearest them, "I can't believe you're going to do this, Harry."
A lamp flickered on. It was Hermione Granger, wearing a pink bathrobe and a frown.
"You!" said Ron furiously. "Go back to bed!"
–– Harry Potter and the Sorcerer's Stone
The word "on" is being used like on in "turn on". Previously, the lamp was out, and it flickered as Hermione turned it on.
I'll add that the meaning is only clear from context -- Hermione is revealed by the lamp, so it must have been off before. You could imagine, however, the following sentence:
The lamp flickered on in spite of the savage wind.
In this sentence, the word "on" would be used in the other sense you suggested, "used to show that something continues."