Do I need to replace my catalytic converter? on 2004 Subaru Forester

My exhaust is getting noisy and the mechanic said he sees some rusted areas where it's leaking. He suggested to change the two pieces of pipes and the catalytic converter plus probably need to change the oxygen sensor because they break easily. Do I really need to change everything or can I just get the pipes changed that show the rusted areas?

Asked by for the 2004 Subaru Forester