When I was a teenager, my neighbour's hamster suddenly started sleeping a lot & she was advised that he was dying, & it would happen within a couple of days. It hung on for almost a week, & it was horrible for her son. He'd be checking on it almost every hour except when he was at school, with the hamster sleeping deeper & deeper. He was only about 6 or 7 at the time, & the little mite would sometimes try to wake it up.

His mum had no way of getting to a vet or the money to pay for one, so once she saw how much it was disturbing her son, she gently asked him to say goodbye to the hamster one morning as she thought it might go that day, then got another neighbour round while she & her son were out to put it to sleep (she didn't ask how, but thought it would be with a cloth over its nose & mouth). She felt it was cruel to let it linger for so long, & it wasn't fair to her son either.

It's the memory of that creature dying so slowly that has put me off ever having one. I don't think I could take having to deal with a lingering death after only a couple of years of life, even though they've had their natural lifespan.
The OP will have to do what's right for the hamster she's got. Personally, I think that a vet dispatching it to hamster heaven asap is the better way, but their own circumstances may not allow for that to happen.