RuntimeException when running drush commands in root folder

I am setting up a local site for development on a ubuntu server 18.04 VM.
I pull our repo into my windows machine and then mount this onto the VM as a shared folder.
I run composer install and it finishes completely, but when I go to my site’s docroot folder and run
drush st or drush cr, I get the following error message:

RuntimeException: Drush::$container is not initialized yet. Drush::setContainer() must be called with a real container. in DrushDrush::getContainer() (line 151 of /media/sf_anothercnas2/vendor/drush/drush/src/Drush.php).
Drush command terminated abnormally due to an unrecoverable error.

Drupal installation went through successfully. In my composer.json,
I have “drush/drush”: “9.7.2”

Composer show confirms that the local drush version installed is 9.7.2 but when I run
drush --version, it returns 8.1.16