You can use the built code from the slicer source to build new libraries and even full executables and applications. This is essentially what the Extension build system does so just using CMake you should be able to add anything you need.
You can use 3D Slicer files any way you want. You can copy whole files or code snippets, but of course we cannot help you with that. If you plan to reuse a major component of the application, such as using MRML as data model then we may be able to help (we are planning to gradually move out some Slicer core components to standalone packages that can be used in C++ and pip-installed in Python), but this requires quite significant software engineering effort on both your and our side.
The simplest, most efficient and least risky solution is build on the experience that we gathered during the past 20 years - by building your application by extending and customizing Slicer core. Slicer was designed for this purpose and several companies use this approach successfully for their product development. We even have a template that makes it easy to get started. It allows you to develop your extensions/customizations independently yet making possible to benefit from new Slicer core developments by separating your custom code from the application platform code.