Law doesn't specify "against an opponent" for PIADM - it could be an act which endangers a team-mate, e. g. a "scissors kick" close to a team-mate's head.
I agree the phrasing of the Law is unclear. I therefore emailed IFAB for a clarification. The answer I got back was that PIADM is about an action that "threatens injury to someone (including the player themself)" and IFAB stated that the next bit, about including preventing an opponent from playing the ball:I disagree. Broadly, I think it is implicit in the Laws that PIADM requires disadvantaging an opponent. But beyond that, as to your specific example, Law 12 does explicitly say that a scores kick is permissible unless It is dangerous to an opponent.
(I do agree that the language of PIADM (unfortunately like too many parts of the Laws) is less than perfectly clear.)
"...is one of the ways (but not the only way) that the player's action threaten injury" David Elleray.
So yes, PIADM includes threatening injury to oneself or to a team mate.