You need to be more specific about the advice, so "the advice" or "your advice" is correct. Just saying "thanks for useful advice" is far too general. It' actually doesn't make much sense.
We definitely don't say "an advice", and "Thanks for a piece of advice" still doesn't tell us which advice you mean.
We want to know which advice!