Treasure tokens are artifact tokens with the activated ability: '{T}, Sacrifice this artifact: Add one mana of any color.' This is a mana ability (CR 605.1a), which means it can be activated any time you could pay mana costs — including during your opponent's turn.
Flash (CR 702.8a) allows you to cast a spell any time you could cast an instant — which includes during any player's turn, as long as you have priority and the stack rules permit it (CR 116.1). So a spell with flash can be cast on an opponent's turn.
Combining these two rules: when you have priority during your opponent's turn and want to cast a flash spell, you can sacrifice a Treasure token as part of paying the spell's mana cost. The mana ability itself doesn't use the stack and resolves immediately (CR 605.3a), giving you the mana you need.
Example: It's your opponent's turn and they just tapped out to cast a creature. You have a Treasure token and a Mystic Snake (a flash creature with a counterspell effect) in hand. You cast Mystic Snake during their main phase (since it has flash), sacrifice the Treasure for {G} as part of the cost, tap your other lands for the rest, and counter their spell.
There are no additional restrictions here — as long as you have priority and are legally able to cast the spell, Treasure tokens are a perfectly valid mana source to use.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.