rmarkdown will not check for RStudio installation. It is not that easy as there could be a lot of ways and place to have a software installed. But I agree that could be done this way.
As often with external software, they most of the time add some informations like environment variable when they start, allowing other software to trigger some behavior when run in them.
rmarkdown is checking Pandoc in PATH, and also in RSTUDIO_PANDOC
environment variable set by RStudio for a Pandoc binary. It will use the greater version of pandoc found.
So adding to PATH is the correct solution to use Pandoc outside of RStudio IDE.