Millimeters.
Millimetres, centimetres or inches
That would normally be measured in cm. It might also be measured in dm., but this unit is not very common in daily usage.
I would go with inches but you could measure it in centimeters.
Grams
You would measure it in centimeters.
The metric unit used to measure the mass of a pencil would be grams (g).
Centimeters
Centimeters
Centimeters
Millimeters.
Millimetres, centimetres or inches
Pencil lead is very narrow. Millimeter can be used to measure it.
centimeter
You could use either centimeters or millimeters, but probably centimeters.
a ruler
That would normally be measured in cm. It might also be measured in dm., but this unit is not very common in daily usage.