Can a barometer be used as an altimeter?

With a little modification yes.

The principals of design for the Barometer and Altimeter are the same. A sealed capsule expands and contracts with changes in air pressure, this movement is then changed to the movement of a dial to get a scaled reading.

However the Barometer would need its scale changing to read in terms of altitude. This would allow a rudimentary calculation of altitude, however as the air pressure changes, the altitude read on the scale would change.

The Altimeter as used in aircraft also has a small thumb wheel or turntable knob that allows you to set the air pressure to the air pressure of the ground. This makes the scale more accurate, and negates any changes in air pressure.