You can do that effortlessly right in openscad itself or in freecad for a more visual way, or in every single cad app in existence I think.
In freecad you first just open the stl file, then Part -> Create part from mesh, then you have a solid you can modify.
I just tried this in OpenSCAD and it crashed:
intersection() { import("3DBenchy.stl"); sphere(30); }
Sounds great in theory until you actually try it and discover that anytime a STL touches another object the F6 render craps out with "Manifold conversion failed: NotManifold"