Nothing wrong with it. I knew several folks at my undergrad who ended up joining their labs as PhD students. Each university has a different culture with it, though. Some schools don't mind taking their own undergrads, while others discourage it.
You will want to have a frank, honest conversation with the professor in charge of your lab about this. Talking with current grad students in your school is also a good idea. You should understand that your professor can't make any promises, and you should apply to a wide range of schools, regardless if you apply to your undergrad or not.