I would definitely be having words with the ex about him getting your DS to keep secrets from you, then perhaps use it as an opportunity to have a conversation about the appropriate use of guns as toys when DS is with him.
FWIW I hate seeing small children with toys guns pew pew-ing everything in sight and my 2 DSs have never been allowed so much as a water pistol that actually looked like a gun. They are 10 & 11 now and have NERF guns, but they are bright colours and don't look that gun like so I have relented a bit. It was a conversation I had with my DP pretty early on though, as I feel quite strongly about children not playing with weapons of war and he is an avid paintballer, so much so that the room that will be DS3s nursery in a couple of months is currently DP's gat room, one wall is entirely filled with a display of all his markers. For the first couple of years that we were together and visiting him, he had a lock on that door so the DC didn't even see the guns. Now they are older and can better understand things, they go in the room (it is also where the PC is) and are utterly un phased by them. They know that once they are old enough (field rules say 12) that DP will take them out to a field so they can have a shoot of them and are perfectly happy to wait, and also understand the rules of shooting shit.
To me, this has been a good compromise as while they were still young and impressionable they were kept away from guns and DP respected that as to us, the stronger feeling won out and while he would have quite liked to have taken them to the bottom of the garden for target practice as a bonding thing, I REALLY didn't want them near guns, so he was happy to wait.
Much as i dislike kids with guns (i get a horrible mental picture of kids in the Congo when I see little ones running round shopping centres with a plastic Uzi) I don't think it is that bad if it is being done as a sport, in an appropriate way. So if your ex is prepared to teach your DS all about gun safety, the importance of never aiming at a living being, cleaning the gun etc and make it a special excursion like going go-karting, then I would find that ok. I think the real issue here is that your exknew you objected and did it anyway, which shows a lack of respect to you as a parent and that he encouraged your son to lie about it.