is there a way to put a lock on TPA to make sure only certian users can access and edit the data inside TPA.
Yes there are some lock TPA services avail in WmTN built-in.
Please review the wm.tn.tpa folder services and BIS reference guide for more information on the usage of it.
Check the B2B Permissions in MWS - but that is doable
Yes those are the lock level services mainly to start with: