You finally ask:
- We don't control your binary program (which still exists on an OS created with only root as the user).
- If you're asking for an example of a program that does what you ask:
So, yes it's possible.
- If you don't mean in source code, then see: https://en.wikipedia.org/wiki/Setuid