Absolutely. There are two ways to do this depending on your needs.
If both devices already have their own phone number and data plan then you can access your primary number from either phone any time through the DIGITS app. Manage all your DIGITS right inside your DIGITS app in Settings >> Advanced Options >> Line permissions OR if you are on a desktop app then visit https://mydigits.t-mobile.com.
If you want each phone to simply share the same primary number and you don’t want to get high-speed data on the second device then you can pair your number with another device for just $10 a month using a Data with Paired DIGITS plan. *Data with Paired DIGITS comes with unlimited data at 512 Kbps.