You can replace either part , I've done it many times with success.
Not on the newer external slave models. They are in fact not servicable as there is not a proper bleed screw.
Ian, you have to go to the dealer and when I replaced mine it was about $200. It sucks about the cost but it took about as long to install as an oil changed. It comes filled with fluid already to go
The absence of a "proper" bleed screw has never been a problem for me . I have changed several , usually spending very little time getting the air out.
My 94 YJ(255,000 km) has an external slave , that one was replaced two years ago , got it at Auto Value $60 , had it running in minutes. The same vehicle...... replaced the clutch master cylinder last year with a plastic ( same as stock ) part , it lasted less than a year . The plastic master cylinders have been upgraded to aluminum , that's what is in it now , $135 at auto value , btw, .... Auto value warrantied the plastic cylinder , I had to pay a difference of $5.
My 88 YJ used to have an internal slave cylinder , last year I built my stroker and converted to external slave while I was re-powering it / converting to fuel injection. The slave cylinder came from ........... Auto value , the line , I made up , bleeding it ? piece of cake.
Oh , I should mention , the 30+ years as a motor vehicle technician helps, from time to time .......... even Waaaayyyy before there was internet.