Yes, you can mount a portable solar panel on your roof, but most portable panels aren't designed to handle changing weather conditions. One bad rainstorm could damage your portable solar panel, so it's not a good idea to mount it outside.
Even if it can handle poor weather conditions, many portable solar panels don't come with mounting technology. So, if you do plan to mount your panel, you'll need to purchase mounting tools separately. Most people set up their portable solar panels when they're using them, and then store them away until they're ready to use them again.