Theoretically yes, although I'm not sure it's entirely advisable. So, a few things to address here:
1: You usually never want to explicitly check for a role, rather you want to check for a permission that the role possesses.
2: Checking category and grade, sure, although I'm still not entirely convinced this should be a permission - it sounds like it belongs more in the business logic?
3: Keto inherently returns booleans, not ints. Ie, keto is supposed to receive pretty simple yes/no questions, and respons with true or false, ie: Can this user view this file? False. So adding numerical comparisons also seems somewhat out of scope for Keto.
The thing that keto could be used for, is closer to "Can this user transfer funds from this account number?" (ie, object permissions) or "Does this user belong to this company?" (ie, group permissions), or "Is this user allowed to credit funds?"