That would be hard if you became friends first. Once you realize you are falling for that person, it;s hard to back off. Almost impossible.
Some have a devout assumption that marriage is not for them, and keep away from that topic, but once an attraction has occurred the feeling just doesn't go away. But you can always out boundaries on the relationship.
I think if you are married, once you notice an attraction, you can cut off all ties.
It's not impossible, and over time, if you commit to avoiding that person, it will fade.
You disagree?