Checking whether an application is currently in the Dock....

, whether or not it is running.

If you really want to know not just the path to a running app, but whether the app is in the Dock (running or not), here is a way:

set theApp to name of application "TextEdit" -- or whatever

set dockApps to do shell script "defaults read persistent-apps"

if theApp is in dockApps then
	set answer to true
	set answer to false
end if