Coach, as happens very often, you're thinking of the NBA rule on this subject. NBA rule 3-1b: "b. In the event that there are only five eligible players remaining and one of these players is injured and must leave the game or is ejected, he must be replaced by the last player who was disqualified by reason of receiving six personal fouls. Each subsequent requirement to replace an injured or ejected player will be treated in this inverse order. Any such re-entry into a game by a disqualified player shall be penalized by a technical foul."
As others have already pointed out, this is NOT the high school or college rule. But you're not completely out of your mind, either