There is no practical solution for this, though there are legal solutions. However, if you choose the latter, i.e., a legal solution, you may risk your career. Therefore, it is always advisable to convince the reporting officer and get relieved.
The Role of the HR Manager
The HR Manager is often seen as a glorified clerk. He cannot make independent decisions unless he exercises his power. He should have the authority to declare that "his" employee has completed the notice period of three months (which is a long period for a small company with less than 100 employees) and that it would be detrimental not to relieve the employee who has committed to joining another organization. He should have the courage to assert that forcing an employee to remain in service after the normal notice period would send a negative message about the company and its culture.
Communicating with HR
Therefore, you should talk to HR, and while doing so, highlight the responsibilities of HR in creating a fair image in the minds of current employees and those who may join the company in the future. If anyone publishes the attitude of the reporting officer on social media, it will remain there, and any person intending to join the company might reconsider. If necessary, you can approach the higher officials to whom your reporting officer reports.