If it's one of the large cylinders, you need a well equipped workshop to try a rebuild.
Otherwise, you might want to try a rebuild but first talk to a parts house, identify the cylinder, and discuss the difficulty you might encounter. The procedure is pretty simple but a lot of torque is required to disassemble and reassemble them.
I just had all my hydraulic cylinders rebuilt and not a one was I equipped to do in my shop.