What surgery do I need for a 6.7 x 4.4 x 5.3 cm avascular anechoic mass with floating debris? Could it be cancerous? I've bad pain in my back and ribs

No one can tell. with this very nonspecific information you gave, moreover decision for any surgery requires careful history and physical examination by a competent specialized surgeon, best wishes.