Puppies go into heat in the spring and fall. I would check with the vet again about spaying. There are pills that they can take that will knock the worms out with one pill, unless you are talking about parvo, which is hard and very expensive to treat. Good luck, hope all goes well.
I am in agreement with Ghilly, that this could WELL be a normal first "Heat" cycle.
It really is amazing how dogs do overcome many things and the natural default state of things kicks in. Even though there has been such physical difficulty for her in her earlier life, a tough little dog can ride all this out.
I also agree that there would be some swelling of the vulva, but it's likely you might not notice this happening for a few days. It's really in the middle of the cycle (the middle week of the three) that vulval swelling becomes more obvious.
Keep an eye on that discharge too. If it's a normal heat cycle, it won't be a LOT of blood, just a drip or two here and there usually. And there shouldn't be anything else in the discharge such as pus, or mucus. It should look like frank red blood at first, not greenish-tinted or blackish, or anything else. (Though later on in the cycle, the discharge usually changes to straw-colour)
She could absolutely be in heat. Animals are amazingly resilient and can survive stress that would wipe out humans and leave them whimpering in a fetal position in the corner. I have seen dogs that were so thin you could count every bone in their bodies, pregnant, giving birth to large litters of puppies and wagging their tails when it's all over with a smile on their faces.
Six months is on the young side to come into heat, but I have seen them in heat as young as 4 or 5 months although cats are more likely to have very early heats than dogs. You said, however, that she is a rescue and you believe she is 6 months old. There's a good chance that she's a bit older than that, even a month would make a difference, and she just looks younger because of the treatment she received. If she wasn't fed well then she could be on the small side and therefore look younger than she actually is.
Is her vulva swollen? If she has a bloody discharge and IS in heat, her vulva will be many times larger than it normally is. It COULD also be puppy vaginitis but that usually doesn't present with blood, just a pus-like discharge. The fact that she's sleeping more could be because she's in heat. A lot of females act "off" when they have their first cycle. They won't eat or won't eat right for the first couple of days, act mopey and not want to run around and be their bouncy selves for a couple of days.
If her vulva is swollen I wouldn't worry a bit because it's most definitely a heat cycle. If it's not swollen I would keep an eye on her for a day and if she is still not wanting to do anything but sleep by tomorrow, take her in so the vet can take a look at her just to be on the safe side because tomorrow is Saturday, vet offices mostly close at noon, and you don't want to have to wait until Monday to take her in to be seen if it IS something that needs to be looked at.
Please keep us updated and let us know how she is.
Ghilly