That is the current rule. Many players are doing this now. Entering there names just to see where they would go and then pulling out. Roy Hibbert did it last year. I think this rule has been like this for the last 7 or 8 years or so. I could be wrong.
It is different now. There is a date by which they have to withdraw their name. The date is before the draft. Back when Lenard did it, they could go through the draft, and even be drafted liked Lenard was, and then go back to school with the team retaining their rights to the player.
His wiki entry doesn't talk about the rule, but does reference him being drafted after his junior year and going back to school:
Lenard played
college basketball at the
University of Minnesota, where he was a star. After his junior season, he decided to test the waters of the
NBA, and declared himself eligible for the draft. The
Milwaukee Bucks selected Lenard in the second round of the
1994 NBA draft. Lenard subsequently opted instead to return to Minnesota to play out his senior season. He finished his career with the
Golden Gophers as the school's second all-time leading scorer with 2,103 points.<sup id="cite_ref-0" class="reference">
[1]</sup>