Everything on layer 3 is solid. If you make a tile that is nearly invisible (using alpha transparancy) you can draw how you want to block something.
Note that using an invisible wall to block the player from going into an area (because its the end of the world) is not a good idea, because its weird if you just hit an invisible wall.
You can make walls with unclimable obstacles (eg. a roof that prevents you from getting out) to give a clear indication of: end of world. Also you can use the warp object, to transport the player to another location (for example, the other side of the map) when they exit that screen. Its also possible to make a loop from the leftside of the screen to the rightside, so you get an infinite corridor, but if you exit it to the right, you get to the adjacent screen.