E.R.
I don't think it's so much a habit as it is that she needs to nurse. When they are teething, they nurse a lot more, for comfort and for nutrition because it takes a lot of energy to get those teeth in. I would NOT night wean her now. She needs to nurse now more than ever.
Also, are you going to wean her before she's one? Just curious as to why. I totally understand if you are wanting to wean, but if you can possibly do it I would keep up until at least a year. It really will help her with all of the transitions she has to make this year. You've done great so far, you only have a little while to go!!! :)
Plus, with her heart problem, the breast milk and daily immunity she gets from you will protect her from illness the first year. Everything she is exposed to on a daily basis, she will expose you to through the breast and you can pass back immunity to her. It's really important especially for babies with heart problems or other things going on.