Quick Answer: It would have been best to let the priest hearing your confession know that you did not feel subjectively guilty for the sin and that you felt it may have been justified. Most priests are happy to address such concerns so as to help you make the best confession possible.
A distinction exists between objective and subjective guilt. That is,something can be always and forever immoral objectively, but the person committing this immoral act may have no subjective feeling of guilt after completing the act. The lack of subjective guilt feelings may stem from a habit of sinning in this particular way, so that the sensitivity to sin flowing over into one’s emotional life (feelings) is lessened or even completely removed. Receiving the Blessed Sacrament in a state of grievous sin can blunt one’s sensitivity to sin. Additionally, it seems that a culture that forcefully promotes sin and which frequently uses erroneous philosophical principles (often unspoken assumptions) that allow for such approval can dull the subjective knowledge of the natural law in us to a certain degree.
It is possible for one to be mistaken about the moral law or church law and its application to a given situation, even to the extent of believing something is a sin when it is not. For instance, sometimes revealing a truth about someone that harms his reputation is necessary, but the person revealing could believe it to be gossip or detraction, even though it is not.
The lack of knowledge (ignorance)and the circumstances (lack of freedom) can reduce one’s subjective responsibility for an act that is immoral, even to a great degree. If this is so in your case, the sin may have been venial and not strictly required sacramental confession.
At least the fear of hell (imperfect contrition or attrition) and a sincere desire to, with God’s help, not sin in that way in the future are required for the confession of mortal sins to be valid (effect the forgiveness of sins). Guilt feelings are not required for confession to “work”.
It would be good to study what the Church’s Magisterium has said about the particular act about which you are concerned. Praying and asking for the light of understanding can assist in re- aligning one’s passions with objective reality.