Yes. But you need to be aware that this behavior is not intended by the developers of file viewer programs and is seen as malicious, not routine, expected behavior, like shown in some movies.
Bugs in viewer programs for media and document files have been abused for a long time. Maliciously crafted files exploit these bugs to execute other code, that could also delete that file that is being viewed.
If you read about security vulnerabilities e.g. in Adobe Flash, Apple QuickTime, Windows Media Player, or Adobe Reader, quite often this is what's meant.
The simplest exploit of course is to crash the viewer, but more sophisticated ones are possible, given enough time and/or money to develop them.
This depends, of course, on the exact environment (viewer program and version, OS and version, etc.) the file is viewed on.
Publication of such a file/exploit would likely lead to the security vulnerability being patched.