First of all, “Spare the rod and spoil the child” is a common misquotation of the Bible. Just as many think the Bible says “Money is the root of all evil” – it doesn’t; it is the love of money to which Paul refers in 1 Timothy 6:10 – so the common formulation on spanking is a misquote of Proverbs 13:24:
He who spares the rod hates his son, but he who loves him is diligent to discipline him.
There have been alternative interpretations given to verses such as this one from Proverbs; for example, likening the rod to the shepherd’s staff in Psalms 23:4 – which is used to guide sheep, not to hit them – but, to my knowledge, the Church has not offered an official interpretation of the verses that speak of using a rod to discipline children. Short of such an official interpretation, there is a range of permitted opinion in interpretation that would include both non-corporal guidance and physical punishment.
The Church does not have an official stance on corporal punishment, leaving it to the prudential judgment of parents based on known Christian principles. Certainly, it would go against Christian principles to inflict harm on a child, so a parent must educate himself to find out if spanking causes harm. Modern advances in child psychology can be of help in determining what, if any, harm spanking may cause. As psychology is a natural science based upon God’s natural revelation through his creation, Christian parents should be careful not to set up a false dichotomy between science and religion.
The Catechism of the Catholic Church says this on family discipline, emphasizing the necessity of discipline but not dictating the form it must take:
Parents have the first responsibility for the education of their children. They bear witness to this responsibility first by creating a home where tenderness, forgiveness, respect, fidelity, and disinterested service are the rule. The home is well suited for education in the virtues. This requires an apprenticeship in self-denial, sound judgment, and self-mastery – the preconditions of all true freedom. Parents should teach their children to subordinate the “material and instinctual dimensions to interior and spiritual ones.” Parents have a grave responsibility to give good example to their children. By knowing how to acknowledge their own failings to their children, parents will be better able to guide and correct them:
He who loves his son will not spare the rod. … He who disciplines his son will profit by him.
Fathers, do not provoke your children to anger, but bring them up in the discipline and instruction of the Lord (CCC 2223).
In any event, after careful study of the issues and in the absence of a ruling by the Church, the decision for or against non-harmful corporal punishment is the parent’s. A parent is free to decide to refrain from corporal punishment, using instead other non-physical disciplinary measures; or he may choose to use corporal punishment so long as he is not causing physical or emotional damage to his children. Given that a parent does have freedom in this matter, assuming that his chosen discipline is not harming his child and assuming that you correctly understood your priest’s advice, your priest should not have told you that corporal punishment is sinful in and of itself. It can be an occasion of sin for a person unable to control himself, but the Church has not said that parents must refrain from corporal punishment.