Can I put a program into a program?

I want to put a program and files into a separate program. The program within the program should run and open the files when the user clicks on it, but the user should not be able to get the files from the program without a password. Is there any way to do this on Ubuntu and Windows?

You are looking for an encrypted container file format.
It´s done in almost every game.

Bottomline, it´s usually an encrypted archive (mostly without compression due to performance reasons) which gets decrypted in realtime. Good enought to block out the normal user, with some efford usually those containers are breakable though. Sometimes the aren´t even encrypted, they just got a complicated header and TOC.