Jayanti, you have raised two very pertinent points:
(1) Civil disobedience or what Gandhiji called "Sattyagraha" is a non-violent and peaceful disobedience of the man made laws when they are believed to be unjust. Here one is prepared to take the consequences without retaliation or resentment.
(2) Yes, Holy Mother also asked devotees not to hurt others even by a harsh word. "One must not speak unpleasant truths unnecessarily. By indulging in rude words one's nature becomes rude. One loses sensitivity without control over one's words."
In the story, however, Mullah Nasrudddin did not follow the true 'spirit' or the 'purpose' of the law. Had he announced loudly his 'find' in the market place, when there were people around, on three separate occassions (as the true spirit of the law demanded) then most probably the news would have got to the rightful owner of the diamond. Since his intention was to keep the diamond for himself he did what he did thereby deceiving himself in believing that he obeyed the law. Here the law is just -- it is saying " Make every effort to find the owner"