There is no law against an officer simply making that kind of “recommendation.” Whether it was appropriate morally and ethically depends on why the officer told your father that and what rules the probation office has about that. If your father is a bad influence on you such that it lead you to violate probation then it was appropriate for the officer to advise your father stay clear of you to give you the best shot at success in your probation. So the details matter.