You are in a difficult position as many parents find themselves when dealing with an Ex and your children. The court makes orders to not discuss the case with the children and to not say anything derogatory about the other parent. But it still happens.
If you go back to court your only witness is your son and that would not work.
But you CANNOT give up. Let your son know you love him unconditionally and will always be there. Try to see if the rife is repairable. Work towards a solution because court action will only cause more problems and hostility.
You may even suggest counseling or co-parenting class to repair the problem before it has a negative effect on your son.
Then as a last resort you could go to court. But this is truly a roll of the dice and who know what the judge will do.
If you are concerned that something is being said about you to your son, you may wish to request that the court make orders for counseling between you and your son. You must constantly reassure him and keep him when he is there. Returning him when he is bored will only reinforce the behavior.
If the behavior continues and you feel that he is being influenced, you may need to seek court intervention in the situation. Courts presume that the best interests of the children are served where primary custody is with the parent most likely to facilitate a relationship with the other parent.
The response above does not form an attorney-client relationship. This answer may or may not apply to you and should not be relied upon as legal advice.