The first version on that page will work on any pin. The second version which has volume control will require a PWM pin (and probably sound like hell).
I think it is safe to drive a piezo speaker directly from a pin. But there are some things you can do to make sure you are safe when driving a mystery load...
- Put a 100 ohm resistor between the pin and the piezo. This will keep the current on a transition from exceeding the limits of the Arduino pin.
- Between the resistor and the piezo, run a shotcky diode to +5v and ground, oriented so they don't normally conduct, but will dump current if the voltage tries to go over +5 or under ground. There are already diodes like these inside the AVR processor, but if you can dump most of the energy through the external diodes you will be better off. (That resistor from the first note will help ensure that the current dumps in the external diodes.) I say Schotkky diode because they are fast switching and low voltage drop. It doesn't need a lot of capacity, it will just be eating spikes.
I'm currently working with a 40kHz piezo transducer, I'm driving it from both leads... +5,0 to 0,+5 and am seeing spikes about 5v on the transitions if I leave out the diodes. That may be a result my double ended driving, but unless you have an oscilloscope to check for spikes, I'd put the diodes in.