Is it possible for a plugin to prevent certain plugins from being installed?

Each plugin is registered by his main filename or directory.
That means that i can place woocommerce plugin (for example) in a dir called foo-bar and the woocommerce plugin will be registered as foo-bar (simplifying).

You can’t detect it, so you can’t avoid it to activate.
But, of course, you can do few tricks depending on the plugin you want to avoid.

Another example: if a plugin declares a well-known constant, you can detect this one and stop/remove the plugin. Of course, in case of update, the constant could be removed and.. broken.

Same way: disabling plugin deactivation is something that works graphically, you can’t avoid the renaming of the plugin dir or the removal itself.