To my (non-native, but fairly fluent) ear, "I will do yoga for good" sounds like you're perhaps planning to raise money for a charitable cause, in a way that somehow involves you doing yoga to attract donations. (Maybe you're livestreaming it?) Or, perhaps, you might believe that doing yoga can somehow make the world a better place just on its own, maybe by "transmitting healing vibrations" or "righting karmic imbalances" or something. Some people do believe such things.
In any case using the literal phrase "for good", in sense 1, with no additional specifiers, carries to my ear the implication that the "good" involved is somehow universal and absolute, applying at least in principle to all of mankind. In practice, what counts as such universal and absolute "good" for you will to some extent depend on your religious, moral and ideological beliefs, but common examples would include things like helping the poor and the ill, protecting vulnerable people from violence and oppression, cleaning up the environment or perhaps spreading (what you consider to be) the true faith that leads peoples' souls to eternal salvation.
If by "good" you actually mean something that only benefits yourself, such as your personal health, then that definitely needs an additional qualifier, since that's not the default meaning of the word. Something like "for my own good" or "for the good of my health" (or even just "for my health") would be fine.
As for the second meaning of "for good" that you quote (i.e. "forever"), it is mostly limited to the specific phrase "gone for good" and a few other analogous phrases involving (usually past participles of) verbs or adverbs describing movement or transformation.
So you might say something is "gone for good" or "back for good" (which is, notably, also the title of a very annoying earworm from the 1990s) or "lost for good" or even "broken for good" or "fixed for good". And you can even extend these idioms to active statements, like saying that you will "fix [something] for good" or "drive [someone] away for good". But all of these usages carry the implication that something or someone has (or will have) changed or moved somehow, and will stay that way.
In any case, "doing yoga" isn't an act of transformation or movement in this sense, so you cannot say in idiomatic English that you will "do yoga for good" to mean that you'll keep doing it forever — and if you do say that, people will likely not understand what you mean. What you could say, jokingly, is that you will get into a specific yoga pose for good, implying that you'll stay in that pose forever. But, of course, that would be silly.