Actually, it is possible to disable the trackpad without needing to connect a mouse or wireless trackpad by using the Mouse Keys feature, but this will block your ability to enter text while it’s on. Mouse Keys allows you to use certain keyboard keys to control the movement of the cursor. While this answers your question, it won't allow you to do what you need.
This can be accessed in System Preferences / Accessibility / Pointer Control (or Mouse & Trackpad on older OSs) / Alternate Control Methods, and then check Enable Mouse Keys after you’ve enabled the 2 checkboxes in the Options window:
- Press the Option key five times to toggle Mouse Keys
- Ignore built-in trackpad when Mouse Keys is on
The first setting will allow this key command to turn the feature on/off so you can quickly access the trackpad again when needed.
This Apple support article explains how to use the feature and includes other ways to disable/enable it:
https://support.apple.com/guide/mac-help/control-the-pointer-using-mouse-keys-mh27469/10.15/mac/10.15