I think this can be done by using a common event and a few ruby commands.
Let's analyze this and we can have a more experienced user actually give us the ruby commands needed.
Say we got three apples. All right? Apples are used by actor id = 1 and 4 (in the database)
Better yet, Apple is usable by CLASS id = 1 for exapmple, and actors 1 and 4 are THAT class.
So first off we need a command that assigns the id of a class to a variable.
Then we need the amount of members into a party.
This is event possible I think. Correct me if I am wrong.
According to what the quantity is, we will event the rest of the action.
We need a Common Event with a Conditional Branch that will assign every party member's id to variables.
This is Event possible.
We can now check if each player id is of that certain class. If so, this will be used.
Now if you want to do this during battle thing gets a little more complicated.
You will have to use a command that gets the id of the player that is actually about to use the item.
This is hard to be done I suppose but I found a "small hack" to do it.
Instead of id you can take the Luck of every hero.
Here is the twist:
Luck modifiers are nowhere.
Luck growth curve to all classes is set to 0
You got significant different actor Luck starting bonus of Luck for each Actor.
For example Hero 001 starts with Luck = 1
Actor 002 has luck = 100
Actor 003 has luck = 200
and so on.
That way, you will know who is who during battle.
Conditional Event comparing Luck if it is >200 then
It's actor 003 do what is about to be done
inside ELSE you put another Conditional branch if it is >100 then
It's actor 002 do what is about to be done
inside the else of that conditional branch
you put the last case (it's actor 001)
Drawback: You unfortunately lose the utility of Luck and you MUST remove it from any damage formulas and other formulas using it on any script.