look man, if you're going to catch feelings over this girl you know the answer. end it.
personally, i don't believe that a man catches feelings the way a woman does. at least not while he's young (you seem like a young guy, forgive me if i'm wrong.)
i'd keep hitting it casually. just don't go into it thinking you're going to turn this girl around. if she cared about you like that she wouldnt be sweating her EX while you're together. that's insulting. as others have said, it's one thing if she's got kids with the guy. it's something entirely different if she does not.
just hit it and leave it alone.
or leave it alone without hitting it.
i'd just set up a casual relationship with this girl and hit until you find another direction to go. maybe then you have a real relationship, with another girl. you won't end up in a productive relationship with this girl.
don't try and turn this girl around. you will almost certainly fail.