The bible teaches us to teach our children. It did not tell us to leave our children to the whims of the world and the school of hard knocks to teach them. That's the philosophy of the world. It's the same error, I believe, as letting kids choose what religion to follow.
The human heart is a garden of wild weeds. It must be disciplined and "gardened" from those weeds. If we let kids learn for themselves, they will get i trouble with the Law. They just will. My kids went to church until they chose for themselves at 18. Only one veered away after that age, and yet he never got into crime of any sort.
Your kids in their situation may not have you and your ex-wife both agreeing in serving God. Not sure. So that's different. Yes, we all learn from hard knocks. But leaving children without teaching and without forbidding certain friends is totally leaving them to the whims of the world. And that's not the bible way. That's how I see it, anyway.
Joshua 24:15 KJV And if it seem evil unto you to serve the LORD, choose you this day whom ye will serve; whether the gods which your fathers served that were on the other side of the flood, or the gods of the Amorites, in whose land ye dwell:
but as for me and my house, we will serve the LORD.
My children are in my house.
But I understand it's different when the parents are not together and both serving God.
This is just me... but I recommend it for all.. but I would have my children know they attend church with me when in my home in a similar situation like yours.