You certainly can! Only restriction is the python needs to be compatible with jython 2.5, so things that only work on python 2.6+ cannot be used.
Just drop the script/lib into the user-lib/pylib folder. More details here How do we import new python libraries to ignition