This article understands if you actually need a router for a wireless printer. The below diagram shows a wireless printer which is connected to a router with an in built switch.
Wireless printers have the option to be configured with static or dynamic IP address. If the dynamic IP address configuration is used, a DHCP server on the network would be required. Typically the router on the network would have a DHCP server, which would then allocate the IP address to the wireless printer.
The laptops and other devices which connect to the printer also requires an IP address. Now we consider two options.
Assuming that the wireless printer is configured with a static IP address and the devices (laptops, wireless devices) are also configured with static IP address, then a router would not be required as the job of the router in this case is to only assign IP address , which in this case is already pre-configured with static IP address. The devices can then connect directly to the wifi printer using its SSID.
Assuming that the wireless printer is configured with static IP address and the devices are configured to receive dynamic IP address from the DHCP server on the router, then a router would be required to provide IP address to devices on the network.
Wireless printers are always recommended to be configured with a static IP address. This is because, if configured dynamically, the IP address of the printer would change which would require settings changes on the each of the device which requires printing. Also it is would be a tedious task to assign static IP address to all devices on the network. So even though a wireless printer can be setup without a router technically, option 2 would be a better choice.