Hi Wonderfails and welcome. It sounds like you're in the right place and I'm so sorry this is happening.
We've seen the same thing with my stepkids especially DSS13. I don't think there's a good answer or a perfect solution. But there are some things you can do to mitigate the damage (both to yourself and to your DD).
First of all I think it really helps to start from a place of realizing, your daughter is really hurting. Your ex is putting her in an impossible position and doing exactly what divorced parents shouldn't - trying to force her to choose between her parents. Either she listens to him and lies to you, or she tells you the truth and disobeys him. Even if it seems like she is your adversary in some ways, she's really not, she's a victim of her dad's manipulation and bad behavior.
So if you think about how, really deep down you are on the same side (just like how making rules like curfews is you being "on the same side" as your kid, even if they don't think so) then the question is, how can you help her navigate this?
I think Lauren makes a really important distinction. You won't be mad about the dog, but you WILL be mad about lying. In our house we are really big on natural consequences. So when the kids lie to us, about their mom or about anything else, we explicitly tell them, this ruins our trust in you and you will have to build it back up. And then when they next ask for something that requires trust the answer is no, because they have not shown themselves to be able to handle the responsibility of our trust.
I think this is a very important lesson for your daughter anyway. PDs often like to create us-and-them scenarios and her dad will probably encourage her to treat other people badly as well. You can teach her that if she does something bad because her dad asked her to, it's HER that will experience the consequences. If she lies to someone for her dad, it's not him that will have lost trust - it's her. Same deal with, say, rudeness - if she cancels plans with a friend because of her dad, the friend is going to think of her as flaky.
Another thing to note is that her dad is lying to her. Of course you wouldn't be made she got a dog (right?). So you can gently and lovingly point that out. Sometimes my stepkids will repeat something that BM says that's so bizarre that I will be genuinely confused. Like, why on earth would we be mad that they got a dog? So if you react like that, with puzzlement, and then reinforce that it's not ok with you that she's lying to you, she can see that her dad is lying to her. That's another good life lesson - her dad will try to triangulate her with other people, and hopefully she will see that she should take things he says with a huge grain of salt.
There are some things that you can do internally too. You can internalize the idea that you are never going to have a reasonable coparent. He is always going to put your daughter in the middle. And there are things that you should know about her life (like that she got a dog) that you might not know. It is very scary and unnerving to try to parent a child over whom you have no control half the time. But you can't really change that; what you can do is try to give her life skills so that she can be responsible with this amount of control over her life (which she shouldn't have).
This is really sad, and I hate to recommend it, but we have largely stopped asking my stepkids about their mom's house. This has actually gotten us farther. Often they will volunteer things they did with her whereas before we were learning nothing. Like literally DH used to say "how was your week, what did you do?" and they would say "I feel like you're always interrogating us about mom's house!" Clearly that didn't come from them, it came from her. But it was putting them in such a bad position, and we weren't getting anything out of it, so we stopped. And like I said we probably know more about their mom's house now.
The other thing that DH has done is that he has stopped asking his ex about things he hears from the kids. They will share with us that she did something incredibly reckless and neglectful and he will just ... not do anything about it. He used to always say something to her, but what would happen is that she would keep doing the reckless thing, but on top of that she would put extreme pressure on the kids to not share anything further with us. So the kids were still being neglected but on top of that they were then also being manipulated and put in the middle of parental conflict. The better solution for us has been to work with the kids on what skills they need, like being about to call 911 in the event of a fire or make themselves a sandwich if their mom is gone all day.
I think it helps to think about, what are you really in control of here? And what is out of your control? Then really focus on changing the things that you can control. His behavior and to a large degree your daughter's behavior is out of your control, but you can control your own actions. About the spy thing, I think that is largely out of your control. But what you can control is: how much you share with your daughter, and to what degree you care what she's telling your ex. Basically our strategy was twofold. 1. Don't tell the kids anything that we didn't want their mom to know and 2. DH ignores any messages from her about things that aren't her business. At first we wouldn't tell them about anything that had to do with finances or my or DH's health, because BM would behave so badly about it. (Notably once she emailed DH to ask him what she should tell the kids if he died at a doctor's appointment). Over the years, more and more we've just decided to not care. So she can interrogate the kids and learn about our lives, and it's unpleasant to know that a person who is stalking us has access to this information, but she can't really do anything about it. It is sad that you can't have more open communication with your daughter. But again, her dad is putting her in an impossible position and withholding things is your gift to her, trying to take her out of the middle.
These strategies will start to mitigate the damage he's doing, but it's not going to cure the underlying problem. We've been doing these things for years, and yet just a couple months ago DH asked DSS if he'd been taking his medicine at his mom's house. He said yes, it quickly came out that the true answer was no, and then all of a sudden we had a SOBBING teenager on our hands wailing "I just didn't want mom to get in trouble!" So these aren't all the answers, they're just the very beginning of a strategy to maintain your sanity and to minimize the impact on your daughter.
Good luck! I think you can make things a little easier even if you can't solve them. I hope you'll come back and let us know how things go.