Is it necessary to have a Demat account when applying for an IPO?

Yes, a Demat account is required to get allotted shares.