It's most likely both, but if laws forbid Udemy from showing the price as a discount if it doesn't fit certain criteria, then Udemy should not allow creators to set that "discount" at all.
I've heard from a Udemy instructor that the reference prices are not even the real prices the instructors have set. It's all made up (by Udemy).