Yes, you can play Apex Legends with a VPN.
EA's User Agreement does not explicitly prohibit VPN usage. However, the terms do state that exploiting or manipulating the game in any way is prohibited, so be mindful if you choose to use a VPN for purposes like manipulating matchmaking or accessing restricted content.