Ulcer formation following sclerotherapy can happen and, fortunately, this is not a common occurrence. Ulcers tend to form more commonly around bony areas such as the inner and outer ankles. Some sclerotherapy solutions are more prone than others to form ulcers and also concentration of solution used and experience of the injector all can play a role. Once an ulcer is formed there are several things that can be done. Local wound care with various topical agents and time will usually heal them. Some ulcers may require debrideing (cleaning) and some may even require excision and then closure of the skin. Most likely a small scar will result.
It is possible to get an ulceration or erosion in the skin from sclerotherapy treatments. It happens when the solution injected does not go directly into the vein, but rather into the surrounding tissue. This is a known risk of sclerotherapy injections which usually can be avoided in the hands of an experienced injector. Nonetheless, they typically heal very well with time and proper care. I recommend you follow up with your dermatologist to discuss optimal wound care so as to avoid any permanent discoloration or scarring.