There's absolutely no guarantee that after making changes an agent will offer a contract. In addition, I never heard of any writer being promised a contract by an agent if the writer makes the changes suggested.
My current agent did exactly that. She liked my voice, liked the writing, liked the story. But she felt there were some problems with the plot, and a few other things.
So what she said was, if these issues can be addressed, I'd definitely be interested in representing this book. Not a promise, but a strong indication.
Of course, she didn't just leave it at that. We spent an hour on the phone discussing it, then she sent me what amounts to an editorial letter detailing problems she saw. (She worked years as an editor in my genre before turning to agenting.) She didn't tell me how to fix the problems, just pointed out what she thought they were and why.
I figured no one is going to put in that kind of time and effort if they're not seriously considering it. Plus, most of the things she had a problem with were things I already had doubts about myself; I just hadn't ever had any professional feedback.
The ms I ended up with was clearly far superior to my initial effort, so even if she had declined to represent me, it would have been time well spent -- basically free advice and critique from a top editor. How could I go wrong?
And I think she had faith I could successfully address the problems with the ms because of what she saw in the rest of it.
So I would say if an agent (at least a respected one) suggests changes, it's a good idea to listen, whether you end up with representation or not.
Unless you completely disagree with the critique, which would be another thing entirely.