Here's a version of the function to unfold the source block at point that should work for Org mode versions before 9.5.4 (including 9.1.9):
#+begin_src elisp
(defun my/org-show-block ()
(let* ((e (org-element-at-point))
(type (org-element-type e)))
(when (eq type 'src-block)
(org-hide-block-toggle 'off nil e))))
#+end_src
It should behave identically to the function below (which only works for version 9.5.4 and above).
Original answer
[Original answer starts here: it uses org-fold.el
so it requires a fairly recent version of Org mode: 9.5.4 and above.]
Here's a little function to unfold the current element-at-point, given that it is a src-block
:
#+begin_src elisp
(defun my/org-show-block ()
(let* ((e (org-element-at-point))
(type (org-element-type e))
(beg (org-element-property :begin e))
(end (org-element-property :end e)))
(when (eq type 'src-block)
(org-fold-region beg end nil 'block))))
#+end_src
It's a no-op if the block is already unfolded.
EDIT: here's another version of this function that is very similar to the one at the top of the answer. It uses an org-fold
function so that it will work in version 9.5.4 or later of Org mode:
#+begin_src elisp
(defun my/org-show-block ()
(let* ((e (org-element-at-point))
(type (org-element-type e)))
(when (eq type 'src-block)
(org-fold-hide-block-toggle 'off nil e))))
#+end_src
As you can see the only difference is the function name.
EDIT: It may be that you are using an old version of Org mode that does not have org-fold.el
. org-fold
is available in Org mode 9.5.4 and later. Emacs 28.2 currently comes with Org mode 9.6 I think, so that should work, but earlier version probably will not.
M-x org-version
will report that.