If the individual is convinced that his actions are contrary to the will of God, he has the right to act according to his conscience. This is the teaching of the Church.
In this case (though not common) if the person believes that this is contrary to God’s will and that by being directly complicit he violates the will of God, he has a moral obligation to follow his conscience. Thus teaches the Church in her declaration on religious freedom.
This does not mean that the individual can interfere in the right of another pharmacist filling this prescription. He can express his reasons and give witness to his beliefs, but just as he cannot be forced to act contrary to what he believes is the will of God, neither can he force another.
The issue here is not what one believes because of some philosophical principal. The issue is what one believes to be the Will of God. One must always comply with that. That being said, it is important that one question self to make sure that it is God’s will that you’re trying to fulfill and not your own or your misunderstanding of God’s will.
This is not easy. These things require great thought and prayer on the part of the individual.
The Catholic bottom line is that no one can act contrary to what he understands to be the will of God, subjectively he could be guilty of serious sin. In many circumstances he may not be, but only the Church can decide this.