I think it depends on the game situation. A team can get a "T" anytime, even when the other team has possession, as they are dead ball whistles. So whoever has the ball gets it back, I believe.
Speaking of 7 point plays, in 1990 when we beat Georgetown in the regular season finale at home, that was the game where John Thompson got tossed, after arguing a foul call on one of his players. Net result was the shooting foul that was initially called, plus two pairs of technical foul shots -- one for each technical foul that led to Thompson getting thrown out of the game. IIRC, we made all six free throws [which was uncharacteristic for our team back then]. Then we got the ball, and Billy Owens hit a three. Swish! 9 point play.