How to `set_frame()` outside of the RenderEngine class?

I have a function in my code that isn’t aware of my RenderEngine subclass, but I need to change frames when inside that function to calculate motion blur. Does calling Scene.frame_set() do the same thing as RenderEngine.frame_set()? Or does it just change the frame without re-evaluating the depsgraph?

In theory, I could just pass the RenderEngine around as a function parameter but that seems like a heavy-handed solution. Any pointers are appreciated!