Firstly, there is no law in Sudan that says explicitly "teddy bears are not to be named muhammed".
Secondly, even if it is, by a slim chance, illegal in Sudan to name a teddy bear muhammed, we are talking about someone's life here. It is no joke for a teacher (that too a volunteer...someone with good intentions) to get punished for something as trivial as this.
Cultural tolerance is fine, but when this tolerance starts to become malignant, we need to stop tolerating.
Definitely, when you are in Rome, do as the romans do.
However, there is no need to respect the law. If the law is stupid in your opinion, don't hesitate to let the world know what you think.