If there is a trade mark and if Polaroid owns it and if you infringed it then yes they can force you to remove it. In addition, they could sue you for either damages (i.e. what they lost because of your infringement) or an account of profits (i.e. what you made because of your infringement). That is what trade mark law is for!
If the trade mark is registered then this is trivially easy for them to demonstrate. If it is unregistered then it becomes a question of if the mark is clearly recognisable as Polaroid's; IMO they could probably show that it is - those particular border dimensions were distinctive of Polaroid instant cameras for many years.
If you want to republish the app, you could probably avoid trade mark issues by allowing users to set the dimensions of the photograph and border, the colour of the border and the location of the caption.