In some cases, your doctor may prescribe medications to dissolve or prevent stones. Or medications may be prescribed to stop an infection. Once the infection is controlled, your stone can be removed.