can a codefendant testify against me in a criminal case for murder?
Yes, each defendant should have their own attorney.
Yes. Anybody could be flipped by the prosecution and offered a deal in exchange for their testimony against you.
There are rules regarding accomplice testimony, etc.
Most definitely. This is why the prosecution files charges against more than one defendant. Sooner or later, one defendant will work a deal with the prosecutor to testify against the other. The term of art for this is "turning state's evidence."