You are thinking of the NCAA rule, in the NBA the injured player cannot reenter the game.
Here's the rule from Nba.com:
Section II-Shooting of Free Throw
a. The free throw(s) awarded because of a personal foul shall be attempted by the offended player.
(1) If the offended player is injured or is ejected from the game and cannot attempt the awarded free throw(s), the opposing coach shall select, from his opponent's bench, the player who will replace the injured player. That player will attempt the free throw(s) and the injured player will not be permitted to re-enter the game. The substitute must remain in the game until the next dead ball.
The WNBA website compares the differences in this rule between the NCAA, the NBA, and the WNBA.
RULE: OPPOSING COACH OR COACH OF INJURED PLAYER SELECTS THE SUBSTITUTE TO ATTEMPT FREE THROWS
NCAA: A coach of an offended player (who cannot attempt free throw(s) can select a substitute player to attempt free throw(s)
NBA: If an offended player cannot attempt free throws (due to injury), the opposing coach may select (from his opponents bench) a player to attempt free throw(s). The injured player may not return to the game.