Am I wrong for going out?

Hello ladies

This relationship is making me feel like I'm a terrible person. 2 years together .

So a Male friend of mine (a friend for like 5 years who once asked me out but I turned down and ever since our friendship level dropped and I told my boyfriend which he still insist I cut ties with him after I've assured it nothing is going on) called on friday evening and while talking he randomly mentioned his cousin is getting married and i said oh I'll love to attend. Next morning he dropped the address and I remembered I had a discussion of attending a wedding I told my boyfriend who currently isn't in the same city with me(went to visit his parents) that I'm going for a wedding and also told him who invited me. He said okay cool. Today I noticed he was acting off but I didn't really stress about it because I felt he had alot doing. Later on I got a text from him saying how I didn't seek permission someone just called me for an event and I just jump off to it .

Was I wrong to have attended the wedding should I apologise or he is just being a controlling freak.