What is the border between an ideal functionality and a protocol? In the context of the UC framework, what is the border between an ideal functionality and a protocol? 

It seems to me that it depends on the level of granularity required for proofs. 

For example, the same protocol ${\Pi}_{1}$ may be described in more than one way:


${\Pi}_{1}$ requires parties to interact just with one ideal functionality ${F}_{2}$.
${\Pi}_{1}$ requires parties to interact with another protocol ${\Pi}_{2}$, that is equivalent to ${F}_{2}$, but it is explicit that it requires parties to interact with ideal functionalities ${F}_{3}$, ${F}_{4}$, ${F}_{5}$.


The only difference between the two cases is how detailed is the description of what ${\Pi}_{1}$ does. So, in general, ideal functionalities are a kind of terminal nodes in a graph of dependencies.

Does it make sense?
There are conceptual errors in the question. Protocols define how parties should interact among themselves and with ideal functionalities (so, it does not make sense to say that one protocol requires parties to interact with another protocol). Moreover, an ideal functionality describes abstractly the behavior of something, while a protocol describes how this behavior is achieved (protocols realize ideal functionalities). Finally, in the description of a protocol the number and the level of abstraction of the ideal functionalities that are assumed as available is up to the designer.