Easy. Celestia probably hatched him. I don't know the fan-fics you read or such but if Twi is being sent to over see the festival like in the first episode. Then she is obviously someone high up in Celestia's court. So Spike is with her as her aid.



It is also possible that Twilight still hatched the egg but not with magic. Here is a thought on this.



Now since she is not a unicorn. I don't see her being Celestia's prodigy, but more of a Ward of the state. Perhaps her parents were loyal servants or such that Celestia would feel obligated to see to Twilight's care and upbringing personally. Twilight would obviously keep her love for learning. Being around magic all her life she would obviously look into Earth Pony Magic, Alchemy and Mechanical Science. Celestia not having found a suitable prodigy to train, spends more time teaching Twilight. As part of this. She is presented with a gift of a Dragon's Egg to study. Wanting be able to actually study a baby dragon instead of just an egg. She invents an special incubator out of a combination of Science and Alchemy. Thus, Spike is born. All be it a couple years later.



Thus in this path. Twi creates her own brand of magic. Which impresses Celestia even more. Keeping her close to her and raising her up in standing in her court. This love of knowledge and ingenuity would also be her magic. The magic she has inside of her. Allowing her to still claim the element of magic.



Though this is just a though as a response to yours. I don't think the egg has to be hatched with magic. Just that it was used to test magic.