The "piston" is a buffer. Most of them are kinda noisy, but it shouldn't be rattling. More of just a "springy" sound. There are two lengths for buffers. Short for carbine and long for rifle. Just make sure you have the short one.
It's function is similar to the return spring in the AKM.
There used to be hydraulic buffers that eliminated the spring sound.