score:7
There is a long-standing principle at UKVI to avoid stipulating that a given piece of evidence is mandatory; it means the guidelines are purposefully vague. As spelled out in the Immigration Rules, the only mandatory requirements are...
From that law they created a policy that the passport be current with a blank page and that it be accompanied by a photo.
Everything else is expressed with modal verbs, most often "should" and "may". Having said all of that, let's look at your question...
My company's HR are ready to give employment proof, but not the info related to time off work. Is it mandatory?
While not mandatory it is a great idea to include something that shows you have accrued enough holiday for your visit. Lots of people on the Indian subcontinent interpret this as a No Objection Certificate (NOC) or a variant document and it has vectored on the net as a requirement.
If the above will not work for one reason or another, you can make a personal attestation about your unspent entitlement. You need good credibility in order for that to work and you will need to explain why that info isn't in any of your employment documents.
I heard that it is needed only for people who are working in government sectors. Kindly confirm this too.
There is no reason to confirm or deny it; as explained, the concept of a requirement is simply one that has vectored on the net. Any other sort of evidence is fine. Note that NOC's are fairly unique to the subcontinent anyway.
We can take a look at the guidance itself. Examine the screen shot...
Based on this, it is safe to conclude that your company is providing what UKVI wants to see.
And finally, from your question: "...confirming that I have been give time off work and asked me to state whether this time off is paid or unpaid..."
This appears to be something you added independently (probably somewhere on the net having to do with Indian nationals); sometimes it's great to include that information, but it is absolutely not mandatory.