I work in a school and have non Muslim friends. I take care not to eat anything offered by them. but now they keep forcing me. I am still avoiding. now they are after me to come visit them for ganpati, if I don't eat anything and don't get involved in their pooja, can I visit them?

Avoid visiting them in polite way
Yes eating anything made by them is not allowed but anything dry or fruits you can eat
Better you may have relation of the exchange of the gifts like perfume chocolates etc