Grounding on to a digital pin

I saw a project on instructables, which is controlling a cdrom's lens focusing actuator (actually an electromagnet) by setting one of its terminals as LOW and its other terminal as HIGH to move it left, and vice versa to move it right, and setting both pins to LOW to bring it to the center.

According to "10 ways to destroy your arduino" 10 Ways to Destroy an Arduino — Rugged CircuitsRugged Industrial Arduino Microcontrollers , it is dangerous to ground on to a digital pin (although the link is more like an advertisement for their own customised arduino).

My actuator's electromagnet has a resistance of about 3 ohms. is it safe to drive it by setting one digital pin as HIGH and the otherone as LOW?

is it safe to drive it by setting one digital pin as HIGH and the otherone as LOW?

No.
But the reason is simply that at 3R you will be asking the output pins to source and sink 1.6 AMPS !

If the load were less than 40mA then it would be a good technique.

it is dangerous to ground on to a digital pin

I think you misunderstood that.

A good way will be to use a motor driver like L293d to drive it. The device you are trying to drive uses a fair amount of current and cannot be driven by Arduino. In such cases we use drivers where control signals from the arduino are supplied to the drivers and based on that the actuator connected to the driver works.