First off, the term "role-playing game" is a term that is unclear at best, especially as it relates to video games.
The term originated with tabletop role-playing games like Dungeons and Dragons, where one player acts as a gamemaster (creating the setting and taking on the role of any and all non-player characters in the setting) and everyone else assumes the role of a character in the world.
The gamemaster sets the stage, the players react and make choices, then the gamemaster resets the stage based on choices made.
Compared to this dynamic, ALL role-playing video games are going to be limited in terms of freedom because no video game can create a world as free-form and adaptive as a gamemaster's imagination and creativity. From that perspective, it's just a question of how much or how little player freedom is limited in terms of acting outside the expected plot or making choices that affect the plot.
I'm of the opinion that the video game genres are poorly defined and we need to revamp the way we categorize video games, but that's another discussion for another time.
To me, a role-playing game is any game in which the main focus of the game is that the player assumes some sort of role in an unfolding story.
In the "typical" JRPG, that role may be extremely limited to the roles of guide and battle commander while progressing through set-in-stone story and characterization, such as we see in most JRPGs. Examples: Final Fantasy X, Final Fantasy XIII, Xenosaga.
In the "typical" WRPG, that role may be very open to where the character is of your design, has only enough backstory of his own to fit him/her into the setting, and has no personality of his/her own, only what you apply to him/her. The story is non-linear and you can also make decisions that may have a profound effect on the way that the story unfolds. Examples: Elder Scrolls, Dragon Age: Origins
I try not see things as so black/white. I don't see it as "This is/isn't a role-playing game" or "This is a WRPG/JRPG." To me, it's a series of spectrums. There's a story spectrum between player freedom and set scenarios, and there's a character spectrum between customized characters and defined characters.
WRPGs tend to favor player freedom and customized characters while JRPGs tend to favor set scenarios and defined characters. However, there is a middle ground with lots of exceptions.
Consider the JRPG Chrono Trigger. Yes, the story is more or less set and you don't get to customize your avatar, but the main protagonist Crono has no distinct personality whatsoever. It is easy to be immersed and feel that you ARE Crono, that Crono is just an in-game proxy for yourself, and as the hero in this world, YOU are driving the story forward. Regardless, it definitely feels more like "role-playing" in the tabletop sense when compared to say, Tidus from Final Fantasy X.
Consider the JRPG Final Fantasy VI. Again, the story is mostly set and all the characters are distinct fictional personalities, but the entire second half of the game is sandbox-style, with a dozen-plus scenarios that you can tackle in any order you want. You can choose where to go, what to do, and when you want to storm the final boss's keep.
Consider the WRPG Fable. You don't get to the design the character (though you can greatly alter his appearance throughout the game) and the over-arching story scenario is even more set than the two JRPGs listed above. You just have the choice of completing certain quests in "impossibly virtuous paragon of humanity" kind of way, or a "ridiculous cartoony super-villain" kind of way.
Even Final Fantasy VII, the game that started the push for JRPGs toward the place that they are today, allowed some input on Cloud's personality. You can decide which character, if any, he has a romantic interest in and many dialogue options allow you decide whether he is a generally friendly snarky guy or a straight-up snarky jerk. You also have control over choices he makes that have minor story effects. Does he find and recruit Yuffie or Vincent or are they never part of the story at all?
I understand that all these games I named are older, and I concede that JRPGs/WRPGs have tended to move toward their respective extremes, but there are still exceptions today.
In the (JRPG) Persona 4, there are extensive dialogue options for you to define your main character's personality as he relates to his schoolmates.
In the (WRPG) Mass Effect, you do have some degree of ability to define Shepherd's personality, but he/she will ultimately end up along certain tropes of "paragon" or "renegade" rather than being blank slate personality for you to fill in like the Warden from Dragon Age: Origins.
Yes, I know that this is damn long post, but I have a lot to say on the subject, so, there I said it.