Assuming that the trains I'm booking don't pass through Germany. So e.g. Rome-Paris.
This should not be an issue in big stations. Usually they have an international ticket desk.
Though my experience doesn't include Germany, I was able to buy tickets for foreign trains in France (for Italian, Spanish and Belgian trains), in the Czech Republic (for Swedish trains), in Sweden (for German and Italian trains), and probably others that I don't remember.
You only need an Internet connection, a credit or debit card (such as Visa or Mastercard) and a printer.
The same service probably exists in Italy, but I have never bought tickets for Italy.
You can book international tickets to most stations in Europe at DB ticket desks. However you should be aware that you cannot make reservations for Belgian or Dutch trains. Not even in Belgium or the Netherlands. Domestic trains in in the Benelux countries are all non reserved. You must have a ticket, but can just sit where you want (but don't sit in 1st class with a 2nd class ticket...)
In most of the cases, you can do that (specially in western Europe). Also, the German online site for booking the trains is pretty good and much better than sites from some other countries. I occasionally travel by trains and find it easy to book it online and just take a printout of the ticket or just show the QRCode and the e-mail on your smartphone.