I usually break my answer up into three basic parts.
The amount of "cheating" you can get away with and the ways in which you can cheat are dependent on three things: where you are now, where you'd like to be, and the difference between the two.
Where you are now. If you have fibromyalgia, an autoimmune disease, or cancer, for example, you really shouldn't be cheating at all on your diet. If you do, the consequences are likely going to be much more costly and your recovery from those cheats is going to be slow and painful. If, on the other hand, you are generally pretty healthy and not a lot of scary, acute stuff going on (or an autoimmune process), then you can likely get away with a little more.
Where you'd like to be. If you come to me and say that your goal is to run your first marathon in a year, then you'd better be ready to roll up your sleeves and work for it. If your goals are more modest, like just losing a few pounds so you look better in your sisters wedding this fall, then you won't have to work quite as hard to get there.
The difference. Imagine coming in with the first story (fibromyalgia or an autoimmune disease) and having the goal of running a marathon in a year. This is a HUGE change, and frankly may be an unrealistic amount of pressure to put on yourself. In either case, assuming that this is where your at and that is your goal, the difference between point A and point B is tremendous and will thus require a tremendous amount of effort to get there.
The key with any restrictive diet is finding "safe cheats". I don't think it's fair to put that much pressure on someone and make them think they have to be perfect- but you also can't go and sabotage your own plan if you hope to get better. Whether it's making coconut milk ice cream (yum!) or AIP gelatin gummies, find what's safe for you and allows you to have a treat every now and again.