Yes, it is fine. I can't see why it would not be ok. Please make sure to wipe down any and all equipment you use before and after use. However, the best exercises are probably walking/jogging/bike riding. Mainly cardio.
If you're not advanced, diseased wise, then exercise away! If you've progressed to ESLD (and you'll know when you get there), then you need to worry a bit more. But hitting the gym is the best thing to do. I should know, ex-competitive weightlifter/bodybuilder with decompensated ESLD.