If you do not have pre-existing liver problem, one dose or one course of difulcan treatment should not cause any liver damage, as this is the most common medication given for yeast infections as well as being a great drug for intraabdominal infection as well.
As far as it exacerbating your heart problem, what problem do you have specifically. If you have a rhythm disturbance, more information would make it easier to tell you what to do. Also, if you are on meds for the heart rhythm disturbance, perhaps they can increase your meds for the 5 days that you are on diflucan. Just a thought.
I also have a heart rhythm problem, but it has been controlled with meds, weight loss, and exercise for the last 2 years or so.