does the constitution of the Republic of Bosnia and Herzegovina give Republika Srpska a veto on foreign troop deployments anywhere in the the Republic of Bosnia and Herzegovina?
The appeal to constitutional principles is not relevant because EUFOR's presence in Bosnia and Herzegovina is not governed by the constitution. It is governed by the Dayton agreement, which was negotiated by Serbia's predecessor state on behalf of Republika Srpska, and by the continuing authorization of the UN Security Council. So what happens if the UNSC withdraws the authorization?
does the Republika Srpska (led by "ultranationalist" Dodik) have a legal basis to demand that foreign troops leave all of Bosnia and Herzegovina, including the Muslim-Croat federation that's "the other half" of the Republic of Bosnia and Herzegovina?
The most obvious legal basis for such a demand would be the lack of a legal basis for EUFOR's continued presence in Bosnia and Herzegovina. Their presence is contemplated in the Dayton agreement through an "invitation" by the parties to the UN Security Council to establish a mandate under chapter VII of the UN charter for foreign military enforcement, under NATO command, of the peace agreement. A veto of a resolution extending EUFOR's mandate would constitute the security council's declining this invitation. There is no other provision in the peace agreement for foreign military enforcement, so the lack of security council authorization would effectively render the peace agreement meaningless.
One possible result is that EUFOR and the High Representative decide that the treaty itself provides sufficient authorization for continued enforcement without the authorization of the security council, though this seems unlikely in the face of the history of a continuous series of authorizing resolutions since the 1990s.
In the absence of valid authorization, EUFOR should just leave. It probably would not "just leave," however, if military hostilities seemed likely. The likely course of events would depend on whether Republika Srpska attempted to secede "as is" or to claim additional territory, as well as on the degree to which Serbia and Russia were involved.
If Republika Srpska did not attempt to secede, then there would be little threat of fighting (at least in the near term), and EUFOR would probably leave.
If RS attempted to secede without claiming any territory from FBiH, it would have no legal basis to make any demands that EUFOR leave the territory of FBiH, because it would be holding itself out as an independent country.
If Republika Srpska attempted to claim territory from FBiH, there would probably be military hostilities, and pretty much anything could happen. Whether Republika Srpska made any demands concerning EUFOR's presence and whether those demands had any legal basis would not be significant factors in any decisions concerning EUFOR's deployment. The more significant factor would likely be the desire to avoid open military conflict directly between any EU or NATO member and Russia.