Central European (German) perspective here.
Summary.
- It is fine for the student to take the course
- It is up to the TA to resolve the potential conflict of interest.
This is quite possible and nothing that unusual.
Long version:
First of all, it would be considered outrageous here if a student couldn't take a course because a particular TA is TAing in that course. Even thinking the student should maybe not take the course would be seen as seriously hampering the student's possibility to obtain their degree (this includes also elective courses).
Every TA here has to sign anti-corruption rules which include that they have to avoid everything that could potentially raise doubts about unbiasedness.
I.e., it is up to the TA to resolve the potential conflict of interest.
For that, it's not necessary to say I'm dating student X - "I'm afraid I may be biased with student X." is sufficient (which covers everything from your best enemy from kindergarden over your high school ex and previous (un)professional TA-student encounters to member of your shared flat without romantic relationship and current dating).
Here's my TA experience:
Not all groups had readily established procedures that TAs were told in advance. However, if not, the solution is to go to the head instructor or professor* and have them decide what to do.
Anyways,
Many courses were organized in a way that each TA had "their" group of students.
-> assign student X into some other TA's group.
Some labwork practica had each TA looking after "their" experiment and student groups were coming along.
- Sometimes, not all student groups do all experiments.
-> make sure X's group is the one to not do Y's experiment.
- In addition, there is usually some other TA assigned as backup (if not, it's by default the head instructor).
-> Backup TA takes care of X's group.
This leaves the marking of written exams where typically each TA was assigned "their" questions.
Here, I'd expect a decision along the lines: the pre-specified scheme of points (usually a list of things that each earn points in the answer, and some mistakes together with their penalties/negative points) is sufficiently clear that X doesn't have the freedom to excercise any potential bias so that the final grade is influenced.
In any case, Y can show how they marked X's exam questions to a fellow TA (or the professor) and have them check that they agree on the marking.
I may add that I once had a student where I decided during the course I may be biased or it may look as if I'm biased (for the totally unromantic reason that they failed their final oral exam with me twice). There were no specific instructions on conflict of interest. However, a quick call to the head instructor solved any potential problem: they re-assigned that student to themselves.
* The whole business of looking after students is "taught" mostly by learning by doing/training on the job like a craft. Fresh TAs coming with their questions about the TA "profession" to the head instructor is totally the expected procedure.