different material in composure layer element

Is there a way to apply a material on objects on a given composure layer element? I am looking into having say a sphere having a material on a layer element and a different one in the editor.
I have some geo that I need to see in a way in the editor but I need to render with a different material at the moment of compositing.
Is that possible?