Because damage remains marked on a creature until the damage is removed as the turn ends, nonlethal damage dealt to a creature with no abilities may become lethal if that creature gains an ability or Muraganda Petroglyphs leaves the battlefield during that turn.
If an effect says that an affected creature "has" or "gains" an ability, Muraganda Petroglyphs won't apply to that creature because it has gained an ability. If an effect simply says that something is true of an affected creature (such as "target creature can't be blocked this turn") then that effect isn't causing the creature to gain an ability.