Can i call a shortcode from a partial?

No.

It sounds like you need to refactor your shortcode as a partial, then programmatically call the partial from the template if the flag is set.

A common construct is to:

  1. Create a partial (to be called from templates)
  2. Create a shortcode that wraps the partial (if you need to call it from content)

layouts/partials/hello.html

<p>Hello {{ .name }}!</p>

layouts/shortcodes/hello.html

{{ partial "hello.html" (dict "name" (.Get "name")) }}

content/post/foo.md

{{< hello name="John Doe" >}}