There cannot be a trade-off between salary disbursement and attendance of the flag hoisting ceremony. Both are independent of each other. Linking both is out of the purview of the law.
People attend the flag hoisting ceremony out of warmth and intensity towards the nation. Imposing a compulsion on attending the flag hoisting ceremony would kill the spirit behind it. Punishing anyone is out of the question.
By then why have you raised the query? Are you from HR and has your management instructed you to deduct the salary of the employee who did not attend the flag hoisting ceremony or you did not attend the ceremony and now you have a fear of salary deduction? What is the exact position?