"Puffing out" is normal for bettas. That is called flaring and bettas do it to intimidate their rival (in this case, your betta sees his reflection and thinks it's another male threatening his territory) or show off. All bettas can flare, some do more than others.
As for secreting something yellow, I don't have the faintest clue what that could be... Is it a liquid? Can you describe it more detail?