Barring SIM lock, yes, you should be able to.
The 3rd gen iPad Pros (and presumably all upcoming models) also support eSIM so no need to even swap physical SIMs. You can sign up for a data plan from AT&T, T-Mobile or Sprint directly on the iPad.
The iPhone, T-Mobile has an app to sign up for prepaid service via eSIM. The other carriers only support eSIM for postpaid.