With the onset of the T+1 settlement cycle, the ex-date is the same as the record date. Investors who purchase shares any day before the ex-date (i.e. record date) will be documented as owners of shares on the record date. That means they'll be entitled to receive the benefit of corporate actions. Investors who purchase shares on or after the ex-date (i.e. record date) won't be recognized as shareowners on the record date. Since India follows a T+1 settlement cycle, if you buy shares on the ex-date, you will not hold the shares on the record date, which is the same as the ex-date. Hence the shareholder will not be eligible for corporate action benefit if he buys the stock on ex-date.
Similarly, you will be eligible for rights entitlements if you sell shares on the ex-date, since it will be debited from your demat account on Ex-Date + 1, i.e. you will still be the owner of the share as on the record date.