Yes it can
any mikrotik running RouterOS can act as router with firewall, NAT, DHCP, Queues, VPN, etc etc..
That is true for every model except CSS range (which feature SwOS)
hAP ac2 actually comes with factory default setting as router+ap. Your WAN will be predefined on eth1 while wifi and eth2-eth5 will work as LAN. You can of course reconfigure it in any way you can imagine.