Your unwillingness to satisfy a simple need does not mean it isn’t a necessity.
It means you aren’t.
Also, something can be both unnecessary and the decent thing to do. “It wasn’t a requirement” is a legal defense in a courtroom, not an end-run around your responsibilities within a relationship.
If someone doesn’t want to be hugged, by all means, don’t hug her. Otherwise, stop looking for reasons to opt out of being a human being.