So i wanted to use PythonOCC, however the last commit in that github page was 2018. So I searched for another way.
Somehow I stumbled on the Part module in FreeCAD.
The main data structure used in the Part module is the BRep data type from OpenCASCADE.
The main difference to PythonOCC described here:
PythonOCC is a project that aims at providing the entire range of OpenCASCADE Technology (OCCT) functions through the Python module OCC. This is a different approach from FreeCAD's, where only certain components of OCCT are exposed through the Part Workbench.
PythonOCC, on the other hand, provides access to all OCCT classes and functions so it is complex but also very powerful. Therefore, when you are limited by FreeCAD's OCCT functionality, using OCC is a good alternative.
In this article it is described how install Part module in any python environment. And this article showed me that is possible to give the geometry from an ifc file to the Part module.
So I created this little script and it calculated the volume form my test cube from the ifc file, that is attached. ?

I am not sure which unit it is, though.
@Moult You wrote also that something is already implemented in Blender -> can you also calculate the volume from the cube from the attached ifc file with blender, so we can check if both methods come to the same result ?
I used the weekly build from FreeCAD with Python 3.10 -> https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds
I also asked in the FreeCAD forum, if it be possible install the Part Module with conda forge -> https://forum.freecadweb.org/viewtopic.php?f=8&t=72098