Yes you can root without custom Rom and keep stock firmware running.
Yes, you can root the phone with official firmware and without having a custom Rom.
--Summarized steps-- (detailed steps already given in main Post)
1) download official firmware for your model using samloader or frija.
2) patch TWRP with Magisk and add it to the AP file in your firmware.
3) go-to download mode and flash the BL, Modified AP, CSC & Home CSC.
4) reboot holding bixby+volup+power into TWRP.
5) in TWRP. Go to Wipe , format data, yes
-Then factory data reset
-Then advance wipe, check system, data, cache & dalvic cache. ( DO NOT WIPE INTERNAL STORAGE ).
6) Install Multidisabler 2.6 zip
Reboot to recovery from TWRP.
That's all. Now you have rooted stock firmware.
Enjoy!:laugh: