Just don't respond to their advice or say something like 'thanks, I'll think about it' if you can and then change the subject. It's hard not to snap sometimes.
The other day I asked my friend a question and she gave me a lecture that went way beyond what I was asking her. It was condescending and unwanted advice, and I found myself blurting out "I don't need a lecture, I just asked a question." So, I know what you mean...it's hard not to snap.