I think you need to broach it as this could keep happening and there will continue to be things like this with your ex, especially if he is controlling. You could see how he could play on these sorts of things as she gets older and I think your priority must be maintaining your relationship with DD and ensuring she feels safe to talk to you. I can understand how invasive it must have felt for you, is there a friend or someone to vent to? How old is DD because I think 13 or 16 is quite different here?
If you think she is mature enough, I think it needs to be a "I'm not angry but we need to talk about this and find a way forward" conversation. Firstly you need to try and find out if he instigated this against her wishes and support with how you'll manage that in future (e.g more cameras , you being in or dropping her somewhere instead).
If she says she wanted him to come, there is an innate tension in the situation that it is your house AND it is her house and you both want different things. I can fully see why you wouldn't want him to visit the house. She also has things that matter to her and is a teenager in a complicated situation. I think you have an option to simply say "my house my rules " but consider that if that's your approach one day she might respond with "I don't want your rules so I'm off". A second option is appealing to her understanding and saying"I know seeing your dad here was important to you but it is very problematic for me, impacts my well-being etc and right now that takes the priority as xyz, how can I help make that have the least impact on you". That leaves the door open to an understanding that there could be things in future where what she wants can be a priority and it's about negotiation. A further option is to point out more practical risks, he could take things, sneak cameras in. I guess that depends on how realistic you think that is and if she thinks that argument is believable (she might just say, well I'll watch him, and then the argument is weaker and might not help your cause).
If she is younger, then maybe you just need to be clear on the boundary and how you will enforce that e.g by staying in when she goes to see him or putting cameras up. I would be careful about her feeling overly told off or ashamed about what has happened, again she is a teenager navigating something difficult. It needs to be quite matter if fact, x isn't allowed to visit, to make sure it doesn't happen I'll do Y. Would it help if I dropped you off next time ?
Good luck, it's a tricky scenario to navigate.