I think it will depend on whether you are trying to pass theory exams or trying to compose a piece of music. In the former case, you will do best to follow the rules you've been taught, and that you will be marked under; in the latter case, do what feels right, taking into account the overall effect you want in the piece, any stylistic conventions the piece follows, etc.
Composers can get away with breaking rules if they do it right. In Beethoven's Piano Sonata no. 9 in E major, Op. 10, no. 1, first movement, second subject, there is a consecutive perfect-5th violation. It's extremely well hidden, and extremely difficult to find - but it's there, and it is completely unobjectionable. I tried to find it a week or two ago, and it took a full 10 minutes or so of staring at the dozen or so bars where I knew it was before I could spot it. Who knows whether Beethoven did it intentionally, or completely unconsciously, just because he knew what effect he wanted, and knew how to get it? Once you're that good, you don't even have to think about rules of that sort - you just do what you want, and you know how to get it right.
But it is probably true to say that you need to know the rules first, and *knowingly* break the rules once you are advanced enough in your skill to make that judgement, instead of accidentally breaking them through neglect or ignorance. Once you know the rules thoroughly, you are in a better position to judge when you can get away (in composition) with breaking them, and when you can't. So I would never use what I've said as an excuse to just not bother learning about "dull" rules. Learn them, obey them in exercises, exams, etc.; then, if you wish to compose, you may be able to decide whether, in a particular case, you need be bound by them or not.
Regards, Michael.