Sure you can, as long as you meet the prestige class’s prerequisites. The Commoner class does not have any special rules about its advancement, it’s just a particularly weak base class.
It’s actually the easiest way to enter the Survivor prestige class (Savage Species), which requires that one’s highest base save bonus be lower than one’s character level. In a similar case, the Adept is the easiest way to enter the Hexer prestige class (Masters of the Wild), since it requires lightning bolt as a divine spell, and neither clerics nor druids get it, nor is it found on any Domain (amazingly).
I would comment that a common way to handle games where you start as Commoners is to have you “trade in” Commoner levels for PC-class levels, to avoid you taking pretty serious hits to your abilities relative to your nominal ECL. This is a non-issue if your DM knows how to compensate, but it might be worth mentioning as an idea to your DM.
You're asking for which is more powerful - is that really what you care about, or do you just want an interesting character? The number one rule of multiclassing is "never lose spellcasting levels." You've already pretty depowered the character as a Rog3/WW1 even with Magical Knack. I imagine none of the heavy CharOp folks have answered this question yet because your initial build has already provoked them into running about their residences screaming like enraged howler monkeys (rogue, 1 strike; losing spellcasting levels, 2 strikes). If you're looking for superpower, the train has left the station. But if you just want an interesting character to play, read on (though you really should specify what it is you want your character to be able to do/be like...)
In isolation there's a legitimate sorcerer vs witch debate, but if you're a third level rogue who has taken one level in witch, taking anything other than more witch is a severe power compromise - the "third strike." You're getting +2 CL in one class from Magical Knack and then if you were to switch, effectively taking -1 spellcasting level - pretty much losing as much as you're getting. So in this case, "definitely Witch."
As you move on, instead of Sorcerer I'd stick with White-haired Witch (seems like it synergizes well with rogue anyway), or go into Arcane Trickster after a couple levels in Witch - it'll keep full casting progression and is designed to highly synergize with rogue. But never lose a spellcasting level again. Look at it this way, if you were to switch to Sorcerer and be like "woot I want to throw spells", at level 10 you're barely going to be throwing fireballs when normal level 10 spellcasters are really melting faces.
There was a character in my last Pathfinder game who was a Rogue 2/Shadow Oracle 9, that worked out OK (he had a limited times a day super backstab ability and had oracle-boosted stealth stats) so it synergized with rogue well, plus invisibility and major image). So you can multiclass, and even use rogue, but definitely stay away from even more multiclassing. Pathfinder made specific design choices to back away from 3.5's "combination of 6 classes for optimization syndrome" and usually staying single-class is as strong if not stronger than a combo, and the more combo you put in generally the greater a disadvantage you'll have over your comrades.
Best Answer
To begin, I have written an enormous discussion of homebrew class design for 3.5. It focuses a considerable amount of attention on prestige classes. I stand by every word in it for Pathfinder as well as 3.5. I consider that answer, more than this one, to be the answer you want to read.
But I do want to address Pathfinder specifically:
For Pathfinder specifically, you have to consider whether or not you would like to continue Paizo’s trend of downplaying prestige classes. Personally, I feel like they were overcompensating for any issues 3.5 had in this regard, and made prestige classes too small a part of the game. Your mileage may vary; lots of people love the fact that almost no one in Pathfinder uses prestige classes.
If you do go that route, I recommend doing so by making small prestige classes – three- and five-level deals that you can hop into for a neat, unusual trick, without taking too much away from your base class. I made similar recommendations for 3.5, but in that case it was mostly because I wanted to countermand the tendency in 3.5 to favor ten-level prestige classes even when it wasn’t warranted; ten-level prestige classes certainly can be a good idea in 3.5, you just need to make a class that deserves it.
In Pathfinder, that’s still true, but by the precedent set by other Pathfinder material, you shouldn’t make ten-level prestige classes. Yes, I know Paizo has: I would consider that a mistake in light of their desire to down-play prestige classes. Instead, they just made the prestige classes simply not that great, or too painful to take because of how a diversion from your base class affected you. I consider that less than ideal. Instead, just make smaller prestige classes.
Small prestige classes don’t have to be small in concept; in fact, being small gives you freedom to be really specific and detailed. It means less work per prestige class, and fewer demands on characters’ levels, which means they are more likely to be able to afford those levels for some niche thing.
On the other hand, you can reject that Pathfinder paradigm, and return to 3.5-esque prestige classes, where they are significant and important, and it is often less a matter of if you will prestige class, but when and in which. If you decide to go that route, my 3.5 advice fits perfectly.