Interestingly enough, the NBA has guidelines for these type of plays that basically says that a dunk can be counted if the ball is immediately adjacent to the basket. If the ball is not immediately next to the basket and the player has to control it at all, then there must be at least .3 on the clock to count it (as opposed to .4 for NFHS). They also wouldn't be able to go to instant replay to view this type of play (if under .3 seconds)
This has been done in an NBA game semi recently by a New York Knick player.