Both your problems should be solved by first free-placing any item with V button (flint, knife, grass etc.) on the deck, then you should be able to place masts and other things.
The only solution I know for building on ships is to first free-place any item with V button (flint, knife, grass etc.) on the deck, then you should be able to place masts and other things. Had the same problem, worked for me and some others