This is the edgiest of edge cases. Intuitively I would assume that such a dialogue box may be a UX smell and there could be better ways to perform a two stage confirmation.
Or you can just bend the UX rules for this one instance.
Or you can consider whether cancel is the best verb anyway; what about “end” or “stop” or “abort”?
On the other hand, I think Yes or No are clearly an answer to "Cancel this action?"