Violence should be a last resort, my advice is to give your son a range of approaches so he can choose what's best in the situation. For example, I tell our 5-year-old boy that if someone hits you first, it's ok to hit them back. But I also give him other options, I tell him that he should always say 'No' or 'Stop' if someone is hitting or being mean to him, that he can run away, that he can tell a teacher, that he can do nothing - I tell him that what he feels is the right thing to do, then he should do that and I will support him.
Kids are clever enough to figure it out themselves and we should encourage them to do so, not insist they act in certain ways (such as your dad telling you to hit the girl).
Our job as parents is to be supportive and a safe space for our kids, they will work it out.