"Could deny", not "must deny"? That's a pretty weak instruction.
1/ notorious apostates, heretics, and schismatics;
2/ those who chose the cremation of their bodies for reasons contrary to Christian faith;
3/ other manifest sinners who cannot be granted ecclesiastical funerals without public scandal of the faithful.
§2. If any doubt occurs, the local ordinary is to be consulted, and his judgment must be followed.
Can. 1185 Any funeral Mass must also be denied a person who is excluded from ecclesiastical funerals.