No, it is not dangerous and a hypnotist cannot force you to do anything that you do not want to do. There is something that is generally called the "hidden observer", and this "hidden observer" is the part of the consciousness that stays fully aware and capable of judging the situation. If something is said that you judge dangerous or inappropriate, the hidden observer would come forward and you would naturally get out of the state of hypnosis.
The only risks associated with hypnosis are mild symptoms such as dizziness or nausea, but those are rare.