Sludge on us, high chol., high ldl, hida 40%, back and abdominal pain, green stool. Is gallbladder surgery an option if hida is 40%?

Depends. Most times surgery is considered if the gallbladder function is less than 30%-35%. It would be quite possible that having gallbladder surgery, for you, may offer no benefit ; could make your symptoms worse with more food intolerance, indigestion, diarrhea, etc. Be very cautious in considering surgery that could have no benefit for you.
Possibly. The hida scan is a way to test the function of the gallbladder. Did you have any symptoms such as abdominal pain or nausea during the hida scan? Did the hida scan reproduce the way you feel when you eat and have symptoms at home? And ejection fraction of 40% is at the equivocal/low normal level. It is possible gallbladder surgery may help. Please see your surgeon.