Yes—you can grow a small lemon tree in an urban planter box, but the planter must work like a proper container, not just a decorative box. Choose a dwarf or compact lemon variety, and make sure the box is at least 40–50 cm wide and deep, with roughly 60–80 litres of soil capacity. Larger is better because lemons dislike cramped roots and dry out quickly in small volumes. The planter must have drainage holes; without them, roots will rot. Use a free-draining citrus or container mix and raise the box slightly so water can escape.
Place it in full sun for six to eight hours a day. Water when the top few centimetres of soil feel dry, then water thoroughly until it drains. Feed with a citrus fertilizer during the growing season, and prune lightly to keep the shape open. If your climate has frost, choose a movable planter with wheels or protect the tree in winter. Repot every two to three years and check for pests such as aphids and scale. In short, an urban planter box can be an excellent home for a small lemon tree if it offers sun, drainage, root space, and shelter when needed.