Hi Floodey
From experience with a Pug HDI engine, I had exactly the same problem as you, a rattle that stopped as soon as you accelerated slightly. I found this was the auxillary drive belt pulley, that runs directly off the engine (cam?) This pulley has an outer metal casting that the pulley belt runs on, and also has an inner metal casting, that attaches to the camshaft. In the middle of these castings is rubber, which is used to stop the transmittal of vibrations from the engine to the auxillary drive belt/ system. Over time the rubber breaks down, and the two castings can knock against each other.
To confirm that it is this part that has gone, check around this pulley for signs of black/ grey dust on the face of it. If you have even a small amount of dust, then this is the fault. To confirm this fault, spray WD40 onto the pulley wheel while the engine is running, the knocking on mine stopped, but started again as soon as the WD40 evaporated/ dried off.
I hope that this helps you, I would recommend the purchase of a torque wrench to ensure the correct tightness of the new pulley. Also you will need an assistant, as you need to put the car in gear and have someone apply the brakes in order that you can undo and redo the nut. The part for my pug was £40, although depending upon source and fitment, this will probably vary considerably.
Best of luck
JamesAtthews