If you want to talk about associativity, then probably what you are interested in is binary operators rather than binary relations.
Recall that a binary operator is something that takes in two inputs, and gives out a single output. Note that this must all be done with a particular set in mind.
For example, if your set is the natural numbers $\mathbb{N} = \{0, 1, 2, 3, \ldots\}$, then addition, $+$, is a binary operator: given two natural numbers, $m$ and $n$, their sum, $m+n$, is also a natural number.
It is not true, however, that all binary operators are associative. For example, subtraction is a binary operator on the integers, but it is not associative: $10-(9-8) \neq (10-9)-8$, since the left hand side is $9$ and the right hand side is $-7$ (and clearly $9 \neq -7$).
Similarly, one can define a ternary operator that takes in three inputs, and gives out a single output. As with binary operators, there is no guarantee that a ternary operator will be associative.
If the above does not answer your question and, in fact, you have other restrictions in mind when you refer to "ternary relationships," please make them explicit.