To me it seems pretty clear that the card can only be played in response to a draw two or wild draw four. It is not the only card you can't play when you want to though in the other case it won't prevent you from playing your last card.
Agent P Card - Play Agent P Card whenever someone plays a Draw 2 or Wild Draw 4 on you and that person must draw the designated amount of cards from the discard pile. The Agent P Card is also a wild card where you choose the color that resumes play.
My reading says this card is played in response to but getting an answer from the publisher would help.
Update:
A representative of Mattel Consumer Services replied as follows, confirming this answer as correct:
Regrettably this card can't be played unless there was a Draw 2 or Wild Draw 4 card played. I'm sorry this is not the answer you wanted to hear. You can certainly make a house rule to make any changes to a game, but they must all be agreed upon before play begins.