Can I attack with a unit, kill it with Headless Resurrection to play an ambush unit to the battlefield that unit was attacking?
No, you cannot — once you kill your attacking unit as the cost, you no longer control any units at that battlefield, so the Ambush condition fails.
Here's why. Ambush lets you play a unit to a battlefield where you control units (Rule 822.1.b). But the condition is checked before Finalization (Rule 822.3) — if by that point you have no units at that location, Ambush no longer grants permission to play there.
The sequence is:
- You attack with a unit to an occupied enemy battlefield.
- You play Heedless Resurrection as a [Reaction], paying the additional cost by killing that attacking unit.
- When Heedless Resurrection resolves and instructs you to play a unit from trash, you choose your Ambush unit and a destination.
- By this point, the attacking unit is already in the trash. If it was your only unit there, you control no units at that battlefield → Ambush's location condition is not met → that battlefield is not a valid destination.
The general ruling from FAQ #9753 and FAQ #10961 is consistent: the attacker cannot play a unit to the contested battlefield via Heedless Resurrection. While FAQ #8743 confirms you can Ambush into an ongoing attack, that's predicated on still having units there — which you don't after killing your only attacker.
If you had multiple units attacking that same battlefield, you'd still control units there after killing one, and Ambush would let you join the combat. But killing the one and only attacker? No.