I put it depends on the situation.
The term is very casual, so I think it would be OK to use among friends if they are comfortable with it. I do think it would be inappropriate to approach strangers, co-workers (unless it is a casual work environment, and everybody is comfortable with it), or casual acquaintances that way. For example, I do think it would be inappropriate to say to the elderly lady accidentally blocking the door of the store, "excuse me dude, can I get through here?"
People should also be aware of the other person's reaction. For example, if a female replies "I'm not a dude" even if in a lighthearted manner, I would take that to mean she doesn't prefer to be called 'dude'.
I've heard 'dude' as unisex although I mostly think of it as a male term, but tend to hear 'guys' more often to address people of both genders.