I would say it depends. If you only have one core/CPU on your computer, and it's a CPU-intensive task, I wouldn't set it to realtime. High might be okay, but that needs experimenting.
If you have multiple cores, and the process is single threaded: go ahead, set it however you want. Your other cores will still be free, even when one core is at 100% load the whole time.
If you have multiple cores and the process is multi threaded: it will depend if all threads will have 100% load. Some programs have a 'manager' thread that dispatches work to other threads but doesn't do a lot of processing itself. That would leave one core nearly free and thus allow for high or real-time priority.
Other programs will try to take in all cores. In this case high might be fine, but it needs experimenting.
Even others will only take a particular number of cores and might not use all cores available. In this case high or real-time priority should be fine.
Unless you're on a single core, go ahead, experiment. Most of the time it won't hurt to set it to high or even real-time. You can set the affinity of a process (how many cores it can use) in task manager as well. This way you can better balance the load on your CPU. It can also help keep temperatures and power consumption down, etc.