The president of the society is not the custodian of the property in the capacity of the president.
In case the information of illegal sale of flat comes to his knowledge through reliable sources with concrete evidences, then as a president he may not give NOC for transferring the share certificate and he may ask the party to sort out the problem legally to legalise the sale. He cannot stop a owner from selling his property.
However if there is a court order instructing the president to maintain status quo and the same has been properly notified to the president of the society, then he may be liable for legal action for violating the court orders.
In my opinion the provisions of section 409 IPC may not be applicable to this situation.
The plaintiff has not notified the president about the court's restriction order, then the plaintiff has to suffer due to his mistake, he cannot take any action against anyone through a criminal law since he has already initiated legal action against those who violated the court order and sought remedies through civil court.
You may discuss in detail about the possibilities of filing the criminal complaint and then take a wise decision.