Going Out with Stock Exhausted
You cannot play anything unless it is your turn. The rules for the stock being exhausted don't allow any player to act outside of their regular turn. The only difference between an exhausted stock or a normal turn is that because there is nothing to draw from the stock, you must draw from the discard pile instead.

So the game can end before you have had a turn at all after the stock was exhausted... be sure to notice if the stock is running low and play what you can while you still can!

From these rules:


  If the last card of the stock is not a red three, play continues as long as each player in turn takes the discard, and he must do so if it matches a meld on his side and the pack is not frozen. (The only exception is that a one-card hand may not take a one-card discard pile). A player does not have to take the discard to form a new meld. The play ends when a player cannot take the discard or legally refuses to take it.