He is a rescue dog that belongs to my wife, so I know he was abused and I know I am the the rule maker and my wife didn’t really have rules for him before, but he only acts scared of me when she is around. He also poops in the house early if she is around, but if he knows she is away and I’m the only one home, he will hold it until I wake up. I can get up at 10 am and he will hold it, but if she is home he will poop in the house earlier.
Abused animals often display behavior that seems illogical unless you know what exactly happened to the animal before it was rescued. I own a rescue dog who was abused and I noticed certain triggers that seem to completely switch off his brain and make him attack his own family. You need to understand that this is not the fault of the dog and he doesn't do it voluntarily.
Mammal brains evolved from simpler creatures like reptiles. Most reptile brains are only concerned with keeping the creature alive: find food, fight off intruders, find mate, end of the thought process. Mammal brains add a few layers to those reptile instincts: social behavior, learning behaviors from past experiences, communication with other creatures. But in very stressful situations the mammal brain reverts to the much simpler instincts of the reptile brain that only has the task of keeping the creature alive. In that state the creature is unable to think clearly and unable to learn new behaviors, no matter how often you try.
Maybe your dog was abused by a woman, then the presence of your wife might trigger him. Maybe it's some specific behavior of your wife that resembles the behavior of his former abuser. Maybe your wife is insecure and your dog picks up the cues and becomes insecure himself. It's impossible to tell without seeing your dog in real life.
In my experience, abused dogs need clear rules and a clear schedule in their life to be happy. Both you and your wife should agree on the same rules for him and always stick to them without exception. If the dog doesn't follow the rules, you must not, not even once, cause him pain as punishment. That has a high risk of triggering him. Instead, you repeat the command and lead the dog to following the command without scolding him.
I find it extremely hard to give you any meaningful advice without knowing more about you, your wife and your dog.
If he is really that uncomfortable around your wife, you should consider finding him a new home with a single man or a very experienced family. This is not giving up on him, but offering him a new environment where he can feel better.
If you don't want to do that, you must try analyzing your wife's behavior and how the dog reacts to her. This answer lists a lot of Youtube videos about understanding dog body language. Although the answer concentrates on aggression, the body language for stress is the same. The better you know all the little tells that your dog feels uncomfortable, the better you can help him.
In the mean time, your wife should always have a little bag of very small dog treats in her pocket. Every time she walks by the dog or the dog walks by her, she should let one treat fall as if by accident. The dog learns that your wife is something positive because there are always treats around her. She should also play, walk and cuddle with the dog as she always did, but she should not scold the dog for anything.
One thing I noticed is that some people are very chatty and talk to their dog at random times about random things. But dogs don't understand human language and small talk is not part of natural dog behavior. Your dog cannot understand the difference between small talk and being given a command. Randomly talking to an insecure dog can make them even more insecure because they don't understand what that human wants from them. If your wife is such a talker, she should not talk to the dog for 2 entire weeks and see if his behavior improves.
I do realize that it might be impossible for you to change the behavior of your wife. Your best chance is probably talking to her and both agreeing to follow the same rules. If your wife isn't allowed to talk to the dog, neither are you.