I think they can be either. The important thing to remember is that prosthetic groups are never proteins and they are closely associated with the active site (I.E covalently bound).
Also, an apoenzyme is an enzyme that doesn't have its associated cofactor present, and a holoenzyme is an enzyme that has its associated cofactor.
I learned a lot about enzyme definitions from EK, don't know if any of that terminology is on the actual test though since I haven't seen it in any of my practices
One thing I've always wondered any maybe someone here can answer, do cofactors have to be associated with an enzyme's active site? I know a cofactor is necessary for the proper function of an enzyme but that doesn't imply where it needs to be bound.