How to get RenderTarget from a material?

I have an object that get’s rendered to both a RenderTarget with a SceneCapture2D as well as the final target (Final RenderTarget?).

What I want is to remove that object from the RenderTarget.

Is there a way to get which RenderTarget, if any, is being rasterized to from a Material?