Just a guess here but I am assuming this is your first ray in that tank? If so I noticed you have substrate in the tank from the picture you posted. Rays love to dig in the sand it is a natural behavior for them they are playing in it or foraging for food. The problem with this is if the sand has been there for awhile and is deep enough it harbors anaerobic bacteria. Once the ray stirs that sand up and starts digging down in it they are pretty much sitting on bacteria and with rays being scaleless it doesn't take long to attack their skin. If you don't have a spare tank I would run to Wal-Mart and buy the biggest plastic storage bin they have and move that ray out of that tank. Try salt and clean water for now if it doesn't slow down or stop in a few days maybe try meds. Here is the sticky posted on here for recommended medicine to use on rays.
List of Medications that are safe for rays and their purposes.
Credited to RoggenForum on composing this helpful list. Below all medication that can safely be used on freshwater stingrays are listed. We advise to only use medication on stingrays if realy necessary. Medication is always a risk and should be used at your own risk Medication against...
www.monsterfishkeepers.com