While retreating, an ambush is what gets this ancient city state (6)
I believe the answer is:
sparta
'this ancient city state' is the definition.
(Sparta was a city state)
'while retreating an ambush is' is the wordplay.
'while retreating' says the letters should be written backwards.
'an' becomes 'a'.
'ambush is' becomes 'trap's' (trap is).
'a'+'traps'='atraps'
'atraps' in reverse letter order is 'SPARTA'.
'what gets' acts as a link.
This may not be right. Some or all of it may be part of another bit of the clue.
Can you help me to learn more?
(Other definitions for sparta that I've seen before include "Ancient Greek city, capital of Laconia" , "austere place" , "A strap from an ancient Greek city?" , "Ancient Greek city known for warlike spirit" , "Ancient Greek city synonymous with austerity" .)