In this case, the heart disease IS the condition, so "it" can refer to either.
(Pronoun reference can be an issue that native speakers make a lot of mistakes with too. When you try to edit someone's writing and say "You have an ambiguous antecendent," most people look at you like you just said something in Maritan.)
Sometimes you need to use logic to figure it out, and sometimes you have to go with the antecedent that is closest to the pronoun.
If the sentence were Jane is just back from New York City, while Mary is just back from Thailand, making her the most widely traveled girl in the class, the "her" would refer to Mary. This is both because logic tells us (assuming you knew that I am in the US) that Thailand is further away and most widely traveled would apply to the girl who had been there, and because Mary is located closer to "her" in the sentence.