It's hard to locate all of the duty to act laws in one place but off of the top of my head I know that you can lose your EMT or First Responder certification for violating the CMR's related to those duties.
Check out 105 CMR 170 and 171 if you can find them and also look at MGL C. 111 and 111c for all of the EMS laws.
The laws for police officers don't say anything about off-duty conduct although there are two general laws that I know of that punish people for failing to protect children under their care and for failing to report certain violent felonies. The first law is fairly new and the second was enacted in response to the Big-Dans incident. I don't think the second law has ever been used and we will have to see if the SJC upholds the newer law. I do think a department could really hammer an employee if they violated one of these statutes.
Off the top of my head: On duty you are required to arrest for violation of an RO, you are required to prosecute for cruelty to animals, you are required to serve arrest warrants, you are a mandated reporter for abuse or neglect against children, elders and the disabled. You might have a hard time justifying not reporting abuse that you see off-duty because the law does not differentiate between on or off-duty personnel. You would also look like a real POS if you stood by and did absolutely nothing in any of these other situations. Just imagine the potential headlines: "Child murdered and neighbor cop knew of abuse"
Department policies and procedures will ultimately determine what you are required to do as an off-duty police officer more than any statute and the MGL's and CMR's spell out your medical responsibilities and protect you from liability. Your department will punish you for the police stuff and the medical omissions will result in you losing your medical certification. (You can't be a police officer without being a first responder or EMT)
You could also find yourself being sued for either type of omission (law enforcement or medical). If you do the right thing on medicals you are immune but if you fail to act you are wide open. Failing to act as an off-duty LEO is a little more ambiguous. Again, check your departments policies because these are what will protect you or sink you.
Personally I try to help on anything medical and I only try to be the perfect witness if it's something criminal. I would only intervene as a last resort on the criminal stuff for tactical and practical reasons - lack of equipment, jurisdiction issues, friendly fire, etc...