When is it love? When is it attachment?
When is it love?
There's Buddhist doctrine about the brahmaviharas which are three different kinds of love ...

I hope you're well
I don't want to hurt you
I rejoice in your virtue/success

... plus equanimity as the fourth.
If you loved your partner unconditionally, you would be OK with that
In the old days before &quot;no-fault divorce&quot; people (in Anglophone countries) used to sue each other for adultery: and the alleged &quot;damage&quot; used to include Alienation of affections.
I think the theory was that if your partner was adulterous then you'd be receiving less affection from them -- an affection which should have been, as their spouse, rightfully yours.
And I think that contradicts your premise, i.e.

My understanding is that love is something you give away without expecting anything in return.

I think another Buddhist theme is that, you do things because they (actions/intentions) are morally right or virtuous. Conversely you don't do things just because you feel like it (e.g. presumably shouldn't hurt people if or because you feel angry).
Because we expect them, and demand, that they behave in a way that doesn't hurt us or make us suffer, that we are attached to the idea that your partner is only yours to have?
I guess that -- expecting behaviour -- might work if you can form a contract, have a meeting of minds, with a sane and reliable partner.
Conversely some people (sometimes children) don't like conforming to other people's expectations.
With such a one, unreliable, a possible winning strategy might be (I don't know if this is applicable to you, feasible, or Buddhist -- but based on experience) if they ask e.g., &quot;What do you expect me to do here?&quot;, reply, &quot;I don't expect you to do anything. You can do...&quot;
Then provide a safe environment, where they can't easily hurt themselves. And the necessities of life. And age-appropriate toys or tools. And good friends, some enjoyable group/social activities -- role models.
I think that behaviour/misbehaviour is partly conditioned/dependent -- if somebody is seeking some liberation then perhaps it's wise to ensure their environment is moral, safe, sane, unoppressive and with opportunities for them to be or to become good friends themselves.
Can you truly love someone with no attachment so that no matter what they do, you do not end up suffering?
I think so if you're semi-enlightened.
You suggested already that you can have children without their causing your suffering.
If I know children, they'll transgress in various ways, large or small -- and you're probably supposed to interact with them and correct their behaviour -- maybe without stopping-loving them though.
There's some doctrine here about choosing a spouse or partner, for what that's worth -- preferably one who is equal.
I think that a or the key to &quot;not suffering&quot; is to behave ethically. There's a sutta Kimattha Sutta: What is the Purpose? (AN 11.1) which begins ...

I have heard that on one occasion the Blessed One was staying near Savatthi in Jeta's Grove, Anathapindika's monastery. Then Ven. Ananda went to the Blessed One and on arrival, having bowed down to him, sat to one side. As he was sitting there he said to the Blessed One: &quot;What is the purpose of skillful virtues? What is their reward?&quot;
&quot;Skillful virtues have freedom from remorse as their purpose, Ananda, and freedom from remorse as their reward.&quot;
&quot;And what is the purpose of freedom from remorse? What is its reward?&quot;
&quot;Freedom from remorse has joy as its purpose, joy as its reward.&quot;
&quot;And what is the purpose of joy? What is its reward?&quot;
&quot;Joy has etc.

I equate that &quot;freedom from remorse&quot; with non-suffering -- &quot;I do not regret it&quot;.
See for example Sīlānussati
In context I think that an example of sīlānussati might be Akkosa Sutta: Insult (SN 7.2) where the buddha seems to be happy.
In my experience that happiness might be in retrospect, i.e. good behaviour now leads to &quot;joy&quot; later.
See also What is the basis?