As F-ES Sitecore said, the controller needs to inherit from Controller. By default WebApi Core inherits from ControllerBase. Changing it from ControllerBase to Controller makes the return View valid.
public class CuentasController : Controller
{
[HttpGet]
[AllowAnonymous]
public IActionResult ResetPassword(string recToken, string email)
{
if (recToken == null || email == null)
{
ModelState.AddModelError("", "Invalid password reset token");
}
return View();
}
}
}