Definitely check with the vet - but if it turns out to be hairballs, there's an anti-hairball treat you can try. It's called Cat Lube (made by Veterinarian's Best) and it's made out of papaya, marshmallow (the plant, not the candy) and slippery elm bark, but it's chicken flavored. It's kind of big, so you have to break it in pieces, but Smudge assures me it's quite tasty, and it sure puts an end to the hack-hack-hack-ewwwwww.

Love, Columbine