Great Organ Music

Are there "rules" of organ/piano fingering that are instilled while playing Baroque music?
I was wondering if there were spicific rules or laws of fingering for playing music from the Baroque poriod. Let's say you're playing music writen by Bach, and it has fingering writen in, must you always follow what is writen? I am mainly asking this because after i tryed to change some fingering, my organ teacher said, "you cant change things untill you know the rules/laws of music". Any ideas are welcome. But refrences would be great so i know were to look. Thanks
Very good question! There are book-length studies on this subject. Let me give you a few things to consider:
1. All fingering in Baroque music is editorial. It has been added by an editor, so there is a level of interpretation/opinion--all editors/editions are not equally good or trustworthy.
2. Baroque music is more "articulate" than later styles (19th century). You should be playing with less legato and in smaller groups. There should also generally be a small articulative break at the bar lines (there may be reasons not to do this sometimes). Fingering is an important factor in creating articulation. In other words, you may encounter some fingering whose sole purpose is to create an articulation, or break--even though it might not be your first choice if you were playing legato.
3. Some people take an historical approach to Baroque fingering. There is a lot of evidence that Baroque performers did not use thumbs to play--or very little, so some performers finger without thumbs. This is probably too strict unless you are after an absolutely historically accurate performance, but it is one approach.
4. I think a good general guide to fingering is to preserve good hand form--you wrists should remain parallel to the keyboard. Choose fingering that does not create awkward wrists turns, resulting in lost motion.
Finally, as another answerer said, fingering is very personal. You WILL have to vary from the markings to suit your hands--everyone does. Instead of scolding you, I think your teacher should begin to teach you how to do this in a responsibly by providing you with the information you need to learn to do this on your own. That is the point of taking lessons, right, to train you so that you can do this on your own someday?
Haarlem Great Church Organ