The first thing I would do is have a vet look at that leg. If he is sensitive to having it touched, there is a physical problem that needs corrected.
However that is no excuse for aggressive behavior. The dogs see all the
People and dogs in the household as a pack with each having their own rank in
The pack and a top dog. Life is much easier if the 2 legged pack members
Outrank the 4 legged ones. You can learn to play the role of top dog by
Reading some books or going to a good obedience class. A good obedience class
Or book is about you being top dog, not about rewarding standard commands with
A treat. Start at
http://www.dogsbestfriend.com/. You are correct that letting the dog sleep with you can lead the dog to thinking it is top dog. So can letting it up on the furniture, but I wouldn't banish him to the floor yet.
If you rub his belly when he comes and rolls over demanding it, he is in charge. If you roll him over, and rub his belly when you feel like it, you are in charge. You need to learn the top dog stuff, going through doorways first, he moves out of your way, you eat first, etc.