You can, but you'll need to check with your doctor first and then get some help starting an exercise program of this kind.
A decision of this kind depends on the type of joint replacement you have and how long you've had it. The implant must be well healed with good motion. The doctor will check for infections, loose parts, and uneven wear.
If everything checks out okay, then a physical therapist will measure motion and test your strength to find your starting weight for resistance. The leg without a joint replacement can be used to test "normal," unless you have pain and weakness from arthritis or other problems on that side, too.
Once you are able to match strength, force, and motion on both sides, then the program can be advanced for both legs. The therapist will direct the frequency, duration, and intensity of your program for best results.