Depends on what you mean by "work"...the reason the vinegar bubbles if the rock will change your water is because it is an acid and it is reacting with the rock which is a base, and therefore will raise your
pH/hardness. Because rocks are the only thing I can think of that are used in the aquarium and may harden your water, the vinegar isn't going to react with anything else. So you can use it to test anything, but since most things used in the aquarium are inert--that is, they won't change your water--you probably won't get bubbles unless you are testing certain rocks.
One note, be sure to rince the vinegar off thoroughly before putting it in your tank.