I don’t know if it’s an actual rule, but there has been a preference for numbers that can be easily represented through hand signals by the referees. The ref can represent any single digit number by holding up that many fingers, and he/she can signal a double-digit number (with each digit lower than five) by holding the hands up separately, or one at a time. A two-digit number where one digit, or both, is greater than five could get confusing.
But that said, there have been more of those numbers in recent years. Dennis Rodman wore 91 with the Bulls, and then was 73 with the Lakers and 70 with the Mavericks. Ron Artest was 91 (tribute to Rodman) at the end of his time with the Pacers, then wore 93 with the Kings, 96 with the Rockets, and is now 37 (tribute to Michael Jackson, he says) with the Lakers. I’m not sure there are a lot of other examples, but it’s not totally verboten, at least.
Okay, one other example: Rasheed Wallace wore 36 for his one game with the Hawks, and for some of his time with the Pistons.