If I play Temporal Breach on a defender at a battlefield, when they replay, are they now the attacker?
No — the replayed unit is still the Defender, and its controller stays the Defender.
The Attacker is defined by who first applied Contested to that battlefield (Rule 459.2.b) — that's the player who moved in, and Temporal Breach doesn't change it. The defender controls the battlefield even while it's contested, so playing the unit back to the same location doesn't apply a new Contested and can't flip the designations.
The banished-and-replayed unit is a new game object, so it will regain the Defender designation during the next Cleanup — which is why Ahri's "when I defend" trigger can fire again in the same combat (FAQ #5362, #11974). But it regains it as a Defender, not an Attacker.