First, let's talk definitions.
Boundaries: open ended, they don't have to be either/or, they simply block out some of the possibilities, they are something you set for yourself. Boundaries likely show up as "I" statements. i.e. "I need ____ from you so I can feel content"
Ultimatums: come from the desire for control or force. They shut down all other options. Ultimatums likely show up as "you" statements. i.e. "you need to fix _____ for me to stay with you"
When you're setting your boundaries, remember, they need to come from your personal needs or wants, not as a way to manipulate someone else. When others are setting their own boundaries, remember, they shouldn't make you feel stuck, if you do feel stuck it is most likely an ultimatum. Also, when you are setting boundaries make sure you are willing to follow through with the "consequences", otherwise it turns into a threat or something you are holding over your partner. For example: "For me to feel like this relationship is healthy and sustainable I need us to work on _____, either through counseling or some alternative, otherwise, I will need to leave the relationship". This might look like a slippery slope - and it is - if the answer to this statement is "I am not willing to work with you on this" then that person has to follow through with their boundary (leaving the relationship) for it to be considered a boundary. Otherwise, the "I will leave you if you don't do ____" becomes a threat or an ultimatum.
Essentially, it is all in the intent which is why it can be such a slippery slope. However, there is a big difference between the intent to take care of yourself and the intent to manipulate or control your partner.