A direct answer to your question: no, I don't know a way to actually prevent kneading, but redirecting it to another material may be possible.
You can try to train a cat to recognize a certain surface as a no-kneading surface, but I think it needs to be something easy for the cat to distinguish from other materials. I'm thinking of a leather sofa for example; you can train the cat not to tread/knead on leather while all other materials are okay.
Then again, it can result in a situation where the cat remembers the rule only when you are near and the rest of the time when that cat feels like kneading it won't matter what's under its paws. Perhaps this would still be better than nothing?
I have trained one of my cats to avoid kneading on my own skin. Especially in summer but also around the year I like to dress lightly at home. Wearing shorts and T-shirt all year, and having a cat that liked to knead a lot whenever brushed and petted. While in my lap she would knead on my skin like in a trance. Every time she started doing this on my skin (arm, leg, whatever exposed) I gently lifted her paws off and moved them on cloth nearest to the cat at the moment. Usually that cloth surface was either my jeans or T-shirt or a pillow.
It took time and many attempts at kneading on skin going by, but eventually that cat learned to notice what was under her paws when she felt like kneading. Success was noted when the cat started to knead on skin and then immediately moved her paws herself onto a cloth surface.
What I mean by "gently lift off her paws" is that I put my fingers under her "ankles" just behind paws and lift the paws up a little, then carry the paws sideways to the nearest cloth surface, moving the cat just so little in the process so as not to disturb her kneading too much. If a pillow was nearby, I would not move the paws at all but just lift them and move the pillow under her paws. She did not get a message like "kneading is bad". For her kneading is okay when she does it on cloth. As I said, it eventually worked out great :)