Conventionally, but not universally, you get the name of a package from the name of the namespace containing the command in question:
set pkg [namespace qualifiers [namespace which $theCommand]]
# Be aware, this produces the empty string for global commands
However, not all packages do this; some older packages do not put their public commands into a namespace (for historical/back-compatibility reasons). In that case, searching the documentation is about the only thing you can do.
Once you've got the package name, you can determine the currently-loaded version of the package with package present:
set version [package present $pkg]
This only works if the package has previously been package required, of course. You can also use package versions to determine what other versions of the package are available in your environment; though Tcl will only load one version of a package into an interpreter context, you can have many different ones installed without (necessarily) having problems.