So, I'm curious, is that an admitted extrajudicial killing, as far as Ukrainian law is concerned? [...]
Or maybe it's another one of those "karma got to him" statements, i.e. not quite an outright admission, but the BBC missed the nuance?
Quotes in the linked BBC article don't directly take credit for the kill, though they do have big "it would be a shame if something was to happen to you" energy.
They certainly seem very happy that it happened, however it happened.
Or is there some kind of wartime law that allows traitors sentenced to prison to be executed instead?
Ukraine abolished the death penalty in 2000, no exceptions. It did so as part of gaining membership to the Council of Europe.
Even that wasn't the case, if Ukraine didn't abolish it, the death penalty isn't gunning down people in another country's streets.
Killing combattants in the battlefield is allowed in the laws and customs of war, but this happened near Moscow, to a civilian, so that's not applicable in the slightest. There are no exceptions for "traitors" either. A civilian convicted of high treason is still a civilian.
I cannot find any way this killing would be legal, assuming it was ordered and/or executed by Ukraine.
Or are the Ukrainian services somehow claiming he was resisting arrest?
Ukrainian law enforcement has no jurisdiction over Moscow, its surroundings, and Russia in general. Ukrainian secret services aren't entitled to arrest people, even Ukrainians, outside of Ukraine.
The way it's supposed to work, if you want to arrest someone who fled to another country, is through an Interpol Red Notice. Said country has no obligation to comply with said notice.
To answer a comment properly, Ukraine does apply the concept of universal criminal jurisdiction (UJ) to "ordinary crimes" (source Amnesty, pages 25 and 121, see also Criminal Code Art. 7 & 8). However, this means Ukraine can consider people criminally liable for crimes committed abroad, not that they are granted the power to arrest them abroad.
Of course, half the point of having secret services is to do things you aren't allowed to do. As a matter of politics, it doesn't matter all that much what's legal or not, it matters what you can get away with. Russia doesn't have much capacity to arrest and try Ukrainian leadership, and vice-versa. So "what you can get away with" is a very large category.