I don't think a library should have any dependency injection framework in it, with the exception if the library is only used by your own projects. Choosing a dependency injection framework is an application-wide architectural decision and a library should not force any specific choice for users of the library.
My suggestion is to remove koin from your library completely.
The crash is just a symptom of the design problem: a library making application-wide decisions. Removing koin from the library also gets rid of the crash.
Conceptually you can use dependency injection in your library. For example, have dependencies as constructor arguments and allow callers to use any DI framework of their choosing (or none at all) to wire up the dependencies.
Edit: Yes, a custom koin component can be used to isolate koin in a way that is mostly internal to the library. There are still hidden dependencies that affect the top level application, for example gradle dependency resolution can update koin to an incompatible version - there have been breaking changes in semantically versioned patch/minor updates in koin's past and there can be more in the future.
I consider the architectural advice still pretty much valid: a generic, reusable library should not come with heavy dependencies such as a DI tool. And not having koin in the library is one way to solve the original problem.