It looks like a hairball to me, usually pass this through their digestive system, many throw them up when they don't pass and become too big. I give my cats a teaspoon of butter once in a while, (almost nonexistent lactose) any kind of oil (food grade) put on their food in small amounts once in a while helps them to get into the intestines.