Xanax is most often prescribed to dogs as a short-term medication for sedation or reducing anxiety. Your dog may be prescribed Xanax for: Managing panic, fear, or aggression related to a specific situation. Reducing anxiety during car or plane travel.