Yes, it is safe to have grounds on your equipment. Your problem might possibly be stemming from a bad ground. It would be wise to start examining the quality of the ground rod you initially chose for earth grounding.
The next thing I would check is if you are running a negative grounded system, that your negative battery terminal is bonded to earth. If the inverter manufacturer tells you to bond the inverter as well, then this must be followed.
It seems to me that you might have some sort of harmonic riding the hot leg into your modem and this might be whats giving you errors. Its hard to tell with out actually seeing your layout.
Break out the ferrite chokes.
Have Fun!!
RoyR
KB2UHF