Yes it's ok
Between the nail service in itself, and the fact that this nail has fungal changes, both tend to loosen the nail plate from the nail bed.
So the nail doesn't lossen more, trim it. It'll be okay. Certainly, you don't wanted to rip from a sock or bedsheet.