It’s unfortunate that that was your first experience with confession. A contrite person
wants to confess all of his sins, and most especially desires to confess mortal sins, naming them by kind and in number to the best of his ability. That’s how reconciliation works between
human persons: you go to the person you’ve wronged and say “I did this and that and the other to you, I was wrong and I feel horrible and I wish I could undo it. Please forgive me.” How much more we desire that when reconciling with God! So it’s good that that’s what the Church requires in the Sacrament, and oftentimes it’s not right when we’re guided otherwise by Christ’s ministers.
To be fair, someone who suffers from scrupulosity is often counseled in a manner similar to what the priest told you (google “ten commandments for the scrupulous”), but that counsel isn’t intended to mean “you don’t need to mention truly grave sins that you are certain you committed and that you remember while you’re in the confessional”.
That being said, and remembering that I’m not a competent authority, my sense is that your confession was valid. If you were properly disposed, had diligently examined your conscience, fully intended to confess all of the mortal sins that you could remember and had contrition for all of your sins, then the fact that you were unable to make a full confession due to circumstances out of your control doesn’t impede the validity of the sacrament.
And there’s much good in availing yourself of the Sacrament when you have no grave sins on your soul. Venial sins are forgiven during the penitential rite at the beginning of the Mass, but that’s not a sacramental confession and it doesn’t confer the same grace. God gives us especially strong help in a sacramental confession in which one says something like “I’m not aware of any grave sin, but I want and need God’s grace to not commit any sins at all. I did thus-and-so which is one of the venial sins that I often commit, I accuse myself of all of my sins both venial and mortal, and I ask God’s forgiveness”. You don’t need to list all of your venial sins, so perhaps that might have had something to do with what you were told in the confessional.
Perhaps it would be appropriate to approach the priest in charity and tell him that, while you understand that it’s possible for a confession to be valid under the circumstances you experienced, nonetheless you were painfully aware of specific mortal sins that you wanted to explicitly confess, you understand that the Church requires those to be confessed in the Sacrament, and emotionally you really needed to do it, but you were denied the opportunity. And yes, you can certainly mention the matter during your next confession and speak of them at that time, but after that you can have hopeful assurance that those sins have been absolved. It will be time to move on, and work at having your mind, by the grace of God, drag your feelings into submission.
When I was entering the Church someone turned me on to a book entitled “Frequent Confession: Its Place in the Spiritual Life”, by Benedict Baur. I highly recommend it.
abebooks.com/servlet/SearchResults?sts=t&tn=Frequent+Confession%3A+Its+Place+in+the+Spiritual+Life&x=40&y=11
amazon.com/Frequent-Confession-Place-Spiritual-Life/dp/1889334162