It depends. What is the something? It's ok to do it if its your job and the liability is on the employer. It's not ok if its against the law and you would be held liable. I think it has to do with who the blame will be put on at the end of the day, to say whether or not it is ok to do something outside your comfort zone.
Now if you're saying you 'have to' because you 'think' you have to or because some higher power in your mind told you to do it ... Then i'd say the liability rests on you. If it turns out that thing was illegal, you're the one thats going to be held accountable.