I think that the way to view it as a more general proposition would be this-
Class A want to use Enumerated Ability B from Class C.
A does not have B.
As a general proposition, how do you adjudicate that use case?
I'm not sure that's the more general proposition. For me, that's become specific in a way that misses the focus of what I'm trying to get at in this discussion.
To put the above back into the OP's original context, class A is 'fighter', enumerated ability B is (say) the 'Healing Word' spell, and class C is 'Cleric'. If the player of the fighter asks "Can I cast 'Healing Word'?", my answer is no, they can't; but that's not really how I view the topic here.
Ultimately, I'm not trying to allow character build options, etc, to be duplicated, I'm trying adjudicate actions declared by my players. And I will absolutely think about those actions within the context of existing mechanics, niche protection, and table fairness as you note below. I guess this point might seem like semantics, but if I'm not trying to duplicate a mechanic, but instead frame the next roll, that opens up scope of both success and failure outcomes.
All that said, for something that seems like an 'out-of-build' declaration my preference in general is to put part of the cost into the action economy (if we're in combat, which the context I assumed for the OP), or into a significant time cost outside of combat. In part this is because players don't like giving up opportunities, and in part because often one of the benefits of having the right mechanical build is being able to quickly and reliably trigger the relevant effect: one action to cast 'Healing Word', or one action to initiate a disarm, etc. That's what being 'good' at doing those sorts of things tends to mean in D&D. Finding a DC to roll against would be another aspect, as without the right build it shouldn't be reliable.
There's a similar argument about the what success and failure look like, but you probably get the idea, except to say that either losing hit dice or gaining exhaustion levels are often convenient failure conditions.
Now, you can scale it up or down (is it a level 1 ability, is it a level 20 ability, etc.). It's somewhat difficult in 5e because there are so many ways for A to get B (multiclass, feats, etc.) that when it comes to enumerated abilities, you can run into the "table fairness" chargen problem; if character can simply use B at any time without devoting chargen resources to it, then those people who are really into chargen begin to believe that there choices are rendered meaningless. It's one thing to "reskin" enumerated abilities; it's another to have people invoke them without having selected them.
At least for some people; it's the tension between enumerated rules and playing to the fiction.
So I agree the difficulty you talk about above is one of the challenges here, and having a tuned eye for mechanical outcomes isn't trivial. If it's the sort of play someone enjoys, it might be good argument for limiting the sourcebooks for a campaign; conversely, if someone just wants to follow the rules as-is, presumably they can be much more relaxed about that.