What would be a good idiom for this?
In Hebrew there is an idiom that translates to English like this: "To go without and to feel with". The usual meaning is that one doesn't have some object or ability but is nevertheless is able to act or to be perceived as if one did have the object or ability. An element of deception is usually not involved, at least not overtly.
EXAMPLES: For instance, you can use it in engineering when you use an approximate method to get cheaply/quickly an otherwise expensive outcome.
Another usage example from a random search: I found an article with this idiom as its title. It refers to the USA going without but feeling with in the wake of the 2011 credit downrating. The idea is that although the USA no longer has stellar credit rating it is still able to borrow money as cheaply as before.
The closest thing I can think of to what you are aiming at is
Fake it till you make it.
It means to act like whatever you want to become until you actually achieve that quality.
That does involve a certain amount of deception, but your definition includes someone not having an ability but being perceived as having it, which is deception whether or not the intent is to deceive.
Play the part means to make believe.
Synonyms are
make a show of: act as if, act as though, bluff, counterfeit, dream, enact, fake, fantasize, feign, fool, imagine, let on like, make as if, play, play the part, play-act, playact, pretend, pretend, simulate.
and
put on an act, act a part: bluff, fake, feign, invent, let on like, make up, play possum, play the part, pose, pretend, simulate.
Examples:
"On weekends, to feed his ego he likes to play the part of a successful hustler, partying at his brother's summer house and serving cheap booze from expensive bottles."
"She plays the part of a happy homemaker, despite the fact that her husband is out of work."