Which version is correct?:
I have ham sandwiches for breakfast.
I have sandwiches with ham for breakfast.
I have sandwiches and ham for breakfast.
Of course, I mean that I eat sandwiches with ham inside them.
Neither phrase will normally be understood in the meaning you intend.
Until I read your explanation I thought you were talking about a plate of sandwiches and, separately, some ham. I'm not being perverse: as a native English speaker it never occurred to me that you meant the filling in the sandwiches.
The usual phrase is simply "ham sandwiches". I can't think of a simple preposition which is used with this meaning: normally if I wanted to expand it I'd say "sandwiches containing ham" or perhaps "sandwiches made with ham".
It might be that "sandwiches of ham" would work: this is not a familiar expression in my experience, but if I met it I would interpret it that way.
A "ham sandwich" is a sandwich in which the principal filling is ham. This is the most common expression.
"Sandwiches with ham" is ambiguous. It would usually mean "ham sandwiches" but it could mean that you have sandwiches with ham "on the side" -- not typical, but possible. Meanwhile, a "cheese sandwich with ham" definitely means the ham is part of the sandwich.
"Sandwiches and ham" definitely means that the ham is on the side of the sandwiches, and not in the sandwich, as in, "I had cheese sandwiches and ham for lunch." Again, I don't know why you would eat the sandwich this way, but it's your food.
If your goal is to communicate that you "eat sandwiches with ham inside them" then "I have ham sandwiches for breakfast" is your best choice. Just keep in mind that a ham sandwich implies that ham is the dominant element of the sandwich and not some minor untraceable component.
Both "I have sandwiches with ham for breakfast" and "I have sandwiches and ham for breakfast" could mean that the ham itself is unrelated to the sandwiches. For example, you're having some nondescript sandwiches with ham on the side.
Depending on the context, "I have sandwiches with ham for breakfast" could mean that you're emphasizing the ham aspect of the sandwich. But in that case it would usually be written "I have sandwiches with ham for breakfast".
From my experience, your first choice is correct, as "ham" in this case is functioning as a modifier for "sandwiches." Your second choice would indicate that you mainly ate sandwiches but you also ate ham to a lesser extent (think of the classic "Would you like some sprinkles with your ice cream?" example.) Your third choice would indicate that you ate both ham and sandwiches.
To be perfectly correct, as "ham" is not an adjective, you could, as mentioned above, use "sandwiches containing ham", "sandwiches of ham", or, to be unnecessarily verbose, "sandwiches consisting partly of ham."
Hope I helped!
Basically out of your choices "ham sandwich" and "sandwich with ham" are also possible, however, the latter is ambiguous as @Andrew stated in his answer. "Ham sandwich" would mean that there's ham inside your sandwich and would the best option.