Man you've just gotta be honest with her. Tell her that you think she's a great girl, that you know that sometimes when a man and a woman are attracted to each other they don't always think straight, and that you know that you and she have a little history that probably shouldn't have happened. But also tell her you respect her and her relationship (it sounds like you do) and that you have a ton of fun hanging out with her. Tell her you understand if she doesn't want to be a friend, but that that would be silly, because you guys have a great platonic relationship and you really enjoy her company. If you're cool and mature about it, she'll have a ton of respect for you.
The reason she backed off is because you were her "walk on the wild side". A young woman who is facing marriage may tempt herself with another guy to see how strongly she feels about her real relationship. She doesn't tell herself that's why she's doing it, but she does it anyway. She may always associate you with feelings of "cheating" or lying to her real BF... that is really going to depend on her... and there may be nothing you can do about it. But being straight with her about being friends is the best option - good luck!