Relevant Section 81 of the Companies Act, 1956 was mandatory for all public companies, listed as well as unlisted.
In case of private company it was necessary only if its articles specifically provide for it, otherwise the shareholders have no pre- emption rights and the directors have the right to offer new shares to any person/s in any number.
Section 62 of the companies act 2013 is applicable to private companies as well.