Yes, the basic idea of these two is "to stop."
When we say 「やめる」, it implies that we give it up and it will not resume soon, or even never.
For example, when we are playing outside and are to stop playing and go back home, we tend to say 「今日はもうやめよう」 but not 「今日はもうとめよう」, because playing is not likely to restart in the same day.
Another example is, when we say 「仕事をやめる」 (which is given another kanji 「[辞]{や}める」), it usually means "to quit job" or equivalently "to leave position."
Compared to that, 「とめる」 does not imply such a future intention.
Also, 「とめる」 usually means to stop something ongoing (but not something that will happen).
For example, when someone is planning to do a bad thing and we want him to stop it, we can say 「やめて」 but not 「とめて」.
In this case of the song, 「息をやめる」 sounds like to stop breathing for a fairly long time which leads health problems.
On the other hand, 「息をとめる」 is to stop breathing for a while, as we do when we dive into water. Although one can keep stopping forever, 「息をとめる」 does not at all imply such a future.