You should be able to do this by unloading the kernel extension (kext) that controls the trackpad from the command line.
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTrackpad.kext to disable it. Change
kextload to re-enable it.
When I tested this, it complained that it couldn't unload the kext, but it appeared to disable the trackpad (and it didn't show in System Prefs) despite the warnings.
Warning for Magic Trackpad Users: I don't have a Magic Trackpad, so I don't know whether this kext is responsible for that device or not. Careful testing this out, you may accidentally disable all your mouse inputs at once.
Edit: I did a little more digging, and there is a "AppleBluetoothMultitouch.kext", which sounds like it's responsible for the Magic Trackpad, so it's likely you can disable the internal trackpad independent of any external ones.