To dream of defecation in a toilet represents cleansing of negative emotions, beliefs, or situations. You may be finished with something in your life. Getting rid of a problem once and for all.
To dream of defecation in an obscene or improper manner represents spoiling something good or creating a problem. It suggests thoughtlessness, and inappropriate thoughts and behaviors. You may be getting rid of a problem in a manner that careless, rude, or irresponsible. Getting rid of a problem in such a way that it creates other problems.
To dream of defecation in front of other people may represent pressure you feel being placed on you to deal with a problem. It may also reflect feelings of embarrassment as you deal with problems out in the open.
To dream of defecating out mice or rats may reflect your attempts to pass your problems off on to other people. Creating problems, the need for lies, underhanded behavior, or conflict because you preferred help yourself get rid of a problem without any consideration for others. It may also reflect problems you are creating for yourself by not getting rid of a problem honestly.
Example: A woman dreamed of her deceased sister defecating on the floor. In waking life she was experiencing her engagement being cancelled by her fiancee and many of her friends starting to turn on her because of it. The defecation on the floor may have reflected the insensitive manner in which her relationship ended creating a mess for her socially.