My friend is mad at me for talking to his little sister am I in the wrong?

Me and his little sister had been friends for 3 months I didn’t even know that she was my friends sister. We were in the hallways talking then her brother whom is my friend saw us Im assuming she pointed at him and said “that’s my brother” I was shocked and said “really? I never knew this whole time” than when I got back home I texted him “I was talking to some girl I saw you walk past me she claims that you are her brother are you” he than told me “yeah I’m her brother why are you talking to her?” I apologized to him as I didn’t know if was wrong. than he told me “can you block her I don’t want you talking to her” I’ve been friends with him sense middle so I kinda had to listen I felt bad I don’t know what to tell her tomorrow that I can’t talk to her because her own brother told me not too… am I in the wrong? I’m afraid he thinks I’m a terrible friend and that he doesn’t trust me?

My friend is mad at me for talking to his little sister am I in the wrong?
Post Opinion