One way to tell is if your piriformis muscle is inflamed. It will feel like sitting on a slightly painful golf ball, positioned just outside and slightly behind your pelvic sit bone. Sitting on a hard rubber ball will make it feel awesome and super painful at the same time, since it’s both poking at the swelling and breaking up the adhesions at the same time. If it’s a bulging disc or other issue, there’s no reason your piriformis muscle would be inflamed or involved whatsoever. But it that muscle is swollen, then that muscle is the problem.
Here is a good website describing where it is and what to do. http://www.stopchasingpain.com/piriformis-syndrome-elusive-obvious/