What was the reason given for not going to the gym? It's rather a 'blanket' ban given that going to the gym can mean very different things to different people - free weights, machine weights, treadmill, cross-trainer, rowing machine, kick-boxing - each with different risks.
The NHS give this advice:-
You can play sports while taking warfarin, but because of the risk of bleeding:
- contact sports that could lead to a head injury, such as football, rugby, cricket and hockey, are best avoided if played competitively
- martial arts and kickboxing must be avoided
You can continue to take part in non-contact sports, such as running, athletics, cycling and racquet sports. However, make sure you wear protective clothing, such as a cycle helmet.
http://www.nhs.uk/conditions/anticoagulants-warfarin-/Pages/Introduction.aspx
It's worth discussing this with your GP. Bear in mind that exercise can lower your INR so it's best to build up gradually.