I read this book at least 30 years ago, but the basic story has stayed with me all this time. It was probably the first fantasy book I ever read. The boy in question is at a magical competition in a regular world and stuns the magicians with a "trick" where he breaks and beats an egg, and then unbeats it and puts it back in the shell. Its real magic, but I can't remember how the rest of the story turns out.
That is Paul Gallico's The Man Who Was Magic. I have fond memories of reading that one from when I was a child. One of the things that may have been throwing you off is that it's not a young boy, but a young man.
From this review:
Magiea is a country of Magicians where the men are all magicians and the women, magician's assistants, (yes, this gets addressed). There is an annual show where each magician must prove himself or be kicked out. Along comes a strangely dressed young man whose magic is real. Thus begins the plot to get rid of him for making the others look bad. Along the way, Adam, helps others do magic, helps a frustrated girl who wants to be a magician, to feel better, and shows that real magic is all around us in the animals giving birth, trees and plants blooming and the rising of the sun.
As you recall, one of his tricks does involve unscrambling an egg. In his final performance, he does an elaborate preface where he shows up with all of the normal stage magic props and then proceeds to show every secret pocket and compartment before removing it from the stage to show that what he is doing is not their sort of magic. I've added the ending in the spoiler space below in case you can't find a copy and are curious:
The town refuses to accept that he did real magic, in particular because it means it's not a trick they can copy (and, in part, because they feel he has called their entire life a lie), and so he is told he may not stay in the town. Before he leaves, he plants his staff into the ground, and it becomes a flowering tree, much as per the common cover.
Other details you might remember is the girl he befriends (the daughter of a prominent magician in the town who wants to do tricks herself) who becomes his assistant, and his dog who talks to him (I think only he can understand the dog in question).
It's also not really a child's story, but a recurring theme in the reviews is people reading it as a child (there's no violence, no sex, and only minor peril, and the themes are fairly simple. Some of the reviews mention dated stereotypes, which apparently relates to certain "ethnic" magicians).