Is there a way to to mix up marker-based and markerless AR in one webAR experience?

The idea is to use three.js + WebXR to place a 3D object in the environment using the hit-testing functionality, and while this is still at work, if a marker / image is detected by the camera (AR.js), place the previous 3D object on the marker / image position, and of course after the marker / image is lost, go back to the normal hit-testing.
So my question is : is something like that feasible using only three.js, webxr and ar.js ?