You would need to use a global because lwgeom_set_handlers belongs to the global context, i.e. it is not part of an object that can have it's own separate state.
Consider this workflow:
A:
we decide to use pool_1 to allocate memory; this is SomeInfo pool_1
call lwgeom_set_handlers to use allocator pointing to pool_1
lwgeom now does a bunch of stuff and want to allocate 12 objects, it will call the allocator set above and 12 objects get allocated form pool_1
B:
now we want to use pool_2
call lwgeom_set_handlers to use allocator pointing to pool_2
lwgeom need to allocate 4 objects and does that with above allocator from pool_2
Implementation:
Declare a global variable SomeInfo *active_pool = NULL
Implement an allocator function that uses (active_pool != NULL) to allocate memory
Call lwgeom_set_handlers passing the above allocator
Create SomeInfo pool_1 and optinally pool_2
A:
assign active_pool = &pool_1;
do stuff with lwgeom library that requires allocation
B:
create pool_2 in case it was not created above
assign active_pool = &pool_2;
do stuff with lwgeom library that requires allocation