I had a "Jessie's Girl" situation myself once.
Whe where good friends and she began dating this guy.
I felt...to quote the song "Jessie's got himself a girl and i want to make her mine". I wanted to tell her, but i knew it would make our friendship awkward, maybe beyond repair.
Anyway, thy eventually had quite a messy break-up and she was left quite vulnerable. I didn't try to move in on her since that would be scummy on my part. I comforted her as a friend and left it at that.
Interestingly she later asked me out and we did date for awhile. We would likely still be together had she not had to move away for a job.
Sometime's karma can be both kind and cruel.....