Yes, you can play Mobile Legends with a VPN.
MLBB’s Terms of Service don’t call out VPNs as “forbidden” by default, and plenty of players use one for privacy or to play on restricted networks. The line you shouldn’t cross, though, is using a VPN to do anything shady, like cheating, exploiting, or trying to bypass restrictions in a way that breaks the rules.