when I stated this problem to an authorized service provider, they said it is the battery that has swelled and affects the trackpad.
just my experience, make sure to verify
I was about to state basically the same thing. I ordered a replacement battery for my 07 black Macbook on Amazon. The battery doesn't fit perfectly because it is meant to be for a glossy Macbook, and mine is the matte one. It still works fine as a battery; the only flaw is, the dimensions are a bit uneven so when I put the battery in its holder, it sometimes messes with my trackpad/keyboard.
Try removing your battery, using your charger as power and see if that fixes the problem. If it does, that means you should order a new battery! If not, we can move on to other possible issues.
