You DON'T have to go through the Academy to be given a Star Fleet commission. Commissions can be granted essentially based on your resume and possibly even field experience.
A token lecture or three at the Academy might still be required - covering all the bases, as we never heard of a commissioned officer who would explicitly
not have attended the facility known as "the Academy".
But we know for certain that short-tracking through the Academy is possible, and thus we have an explanation for i.e. Starfleet possessing a ship full of Vulcan officers only a decade or so after Spock became the first Vulcan to attend Starfleet Academy. These others might have attended, too - but they would have enrolled only after establishing themselves as experienced starship officers in the Vulcan fleet, thus reaching positions well above Spock's without forcing us to assume that Spock was a slacker.
It's also noteworthy that neither Diana nor Beverly went through the academy. Both were offered commissioned positions because of their expertise.
Is there any onscreen proof for such a claim?
I don't remember the episode, but there was an episode where someone asked data if his rank was honorary, to which he replied, he had gone through the academy.
That was in the TNG pilot already.
Riker: "Then your rank of Lieutenant Commander is honorary?"
Data: "No, sir. Starfleet class of 78; honours in probability mechanics and exobiology."
A couple of points of interest here. Riker speculates that Data holds honorary rank apparently because he has glanced through Data's records and learned that Data is a machine (rather than, say, a funnily colored humanoid from Computia 1010). Very strange of him to miss the fact that Data did attend the Academy, then - most records today would have such information on the first page, now wouldn't they?
Also, Data's mention of "class of 78" cannot refer to the year he enrolled or graduated, as both 2278 and 2378 are out of the question. Yet he did say "78", so perhaps we are to assume that he is emphasizing how there were 77 witnesses to his attendance? A class size of some 80 students makes sense, allowing so many of our heroes to graduate near the top of the class (statistically less likely if the classes are bigger) and to know each other so well (more socializing within a smaller class). But the very existence of a "class" seems to go against the idea that the length of studies is up to the student. And if Starfleet Academy consists of classes of just eighty, then there must be quite a few classes each year, making it less likely rather than more that officers of different age would know each other so well.
Timo Saloniemi