How does 'The Stack' work?
The stack does not matter here. Sacrificing a creature is part of the cost of casting Tormented Thoughts (it says so on the card). By the time your opponent has a chance to cast a spell, the creature you sacrificed will be in your graveyard, and therefore not a legal target for Disperse.