You could statically assign an IP to the printer (if it has WiFi/ethernet) and not set a default gateway. It then won't know how to communicate with the internet but still be accessible on the same local subnet.
A more advanced route would be separate VLANs with routing rules between your main vlan and the printer vlan, while blocking all outbound traffic from the printer vlan.
Or you could set up something like a raspberry pi or similar as a print server. The printer connects to it via USB only, so has no access to any networks. And the raspberry pi is the device you configure and trust, which does the translation from network based printing to USB based printing.