You know, I don't think you really did anything wrong. These things happen - we all have crushes even in committed relationships. All we can do is modify our behavior so that the crush doesn't "escalate" and that's exactly what you did.
I will give an example of a different situation where an apology is appropriate IMHO so you can maybe see the difference: LordL was helping a friend out with her business as a favor. After about a year, he abruptly decided to stop working with her. He told me the relationship had just gone sour and I thought it was because the friend had been really flaky about communication for a while related to some medical issues she was having. When I talked to her she was really concerned that I was mad at her for how she acted. I had no idea what she meant so I told her I wasn't mad, she did nothing wrong, that it just wasn't the right time for them to work together because she needed to focus on her health rather than building the business partnership. She seemed really relieved.
Well, LordL eventually confessed that part of why he ended the partnership was that this "friend" was flirting with him and flattering him with lots of attention and it had gotten really uncomfortable. He showed me chat logs with her that corroborated the story. THAT was why she was worried I was mad. I was pretty upset that she wasn't forthright about what actually happened. I would have had more respect for her if she'd said "Hey, I developed a bit of a crush on LordL and things got a bit flirty. I shouldn't have done that and I'm sorry." The fact that she was happy to leave me with the wrong impression because it let her off the hook STILL makes me mad. I basically gave her the cut direct over it because I felt she wasn't trustworthy; if she'd apologized I think we could still have been friends.
Also FWIW if you were wondering why he didn't just fess up from the start, he was ashamed that he participated in it and afraid of my reaction. We did end up spending time in couples therapy working on these sorts of issues (boundaries with opposite sex friends, communication if we cross a boundary, etc).