I've looked into the issue.
If machine translations of documents in Slovenian are to be believed, he competed representing club Sokol, a notable club for Slovenian athletes. So, he was decidedly not representing (or not wanting to represent) the Austro-Hungarian Empire at the time. There has been a notable case of an Austrian gymnast who represented an American club at the early Olympics, and even his individual medals are counted for the United States instead of Austria. So, the focus is on representation rather than nationality.
Though I have found absolutely no official confirmation on the subject, some sources claim that FIG transferred the medals from the 1911 Worlds earned by Bohemia to Czechoslovakia, and in every source I could find Vidmar's medal is credited to either Serbia, Slovenia or Yugoslavia. No source at all credits his medal to Austria, Hungary or the Austro-Hungarian Empire. Besides, Vidmar was a Lieutenant and he joined the Serbian rebel army in 1912, so he had much stronger ties with Serbia, an existing territory at the time, rather than Austria-Hungary.
This is a complex issue and I've tried my best to find all the information about this. The medal table from the link I've posted is the most complete one I can find (though they credit a bronze medal to Slovenia in 2002 when in fact it was a silver medal, but this is a very minor mistake). I have enough reasons to believe they may have had access to official information. Their medal table in Rhythmics is also the most complete one in the history of the sport. Besides, this is as close to official information as we can ever get and I doubt the FIG could shed a light on this issue. They seem not to care about past results, which is a shame.