There is no airport on St. John, so the federal-at-the-airport story is different here, but the rules still bite you at the ferry. The ferry to Red Hook on St. Thomas is short and often casual, but inter-island transport of cannabis isn't authorized. Each USVI island is its own regulated market. Buy on the island where you plan to consume.
If you're on St. John as a day trip off a cruise ship docked at St. Thomas, the same rule applies in reverse. Whatever you buy on St. John stays on St. John. It cannot ride the ferry back, and it absolutely cannot board a cruise ship. Cruise lines ban cannabis in their guest terms and the ship deck is federal jurisdiction.
If you're staying on St. John and flying home, you're flying out through Cyril E. King airport on St. Thomas. TSA and federal drug agents work there. Whatever you buy on either island stays in the islands.