Can I delete or edit the mapping of a cost element to an analysis group?

Yes. You can delete or edit the mapping of a cost element to an analysis group, even if the cost element is mapped to a cost component group that's referenced in a cost profile.