The official would be wrong in your situation. Once the horn sounds, the period is over and any unsporting behavior is penalized at the beginning of the overtime period.
They should have allowed a player from the Cavs to shoot the FT (as long as that player was in the game at the end of the 4th period) and then have the jump ball for the OT period. (NBA Questions & Answers #294, pg. 59. Rule 5- Section III-b.)
That had to be one ugly game to be tied at 52 after 48 minutes of play.

I'm guessing that this is a hypothetical situation, b/c I can't imagine that any NBA ref would mess that up.
Welcome to the board