It would seem that it's possible for the AI to raze a capital, as a couple of them are missing in this game.
I think I figured this out. It's not exclusive to the AI. If a capital is a couple of degrees removed from its original owner it's possible to raze it. In my last game:
Xi'an: China -> America -> me = could not be razed
Ottawa: Canada -> free city -> me = could not be razed
Baghdad: Arabia -> America -> free city -> me = could be razed
Not sure if the final scenario holds if the capital belongs to a third empire instead of being a free city. In all cases, the option to return it to its original owner was available.