As a general question, can you buy flexible tickets in Poland which allow you to get on and off on your route?
For my specific case, is there a ticket I can get that will allow me to travel from Warsaw to Gdańsk breaking my journey at Malbork? If not, what is my most cost effective option?