When you actually try to use ortApiGetAllocatorWithDefaultOptions, you get free(): invalid pointer. This is because ortApiGetAllocatorWithDefaultOptions internally calls wrapCOrtAllocator which calls ReleaseAllocator in the finalizer but the documentation of ortApiGetAllocatorWithDefaultOptions states:
[out] out Returned value should NOT be freed
I'm willing to fix this but I'm not sure whether you want wrapCOrtAllocator to keep calling ReleaseAllocator and therefor to avoid using wrapCOrtAllocator in ortApiGetAllocatorWithDefaultOptions or whether you want to remove the call to ReleaseAllocator, but then you need something new in case you ever use another kind of allocator that does need to be released.