Hi John,
Yes, using an APIC with a Nexus 9504 is optional because it can run in two modes.
With N9K switches, you have the following two options:
(1) ACI Mode - which uses the APIC for configuration.
(2) Standalone - which runs NX-OS for configuration and does not use the APIC.
Hope this helps.