TL;DR
- It is not a trivial problem to solve because you need to use an image editor that allows you to display and edit based on a X,Y DPI for the image that is different than the X,Y DPI (aspect ratio) of your work display.
- The Gimp is a possible solution, as it is a free, open-source, multi-platform tool that supports this type of image editing.
The key is that Gimp, and other similarly sophisticated image editors, will let you set the DPI (or, PPI, "pixels-per-inch") for the image, then respect this in your display and editing of the image. You do this via the Image | Print Size...
menu option. So you unlock the PPI settings in the dialog, and set them to respect the 5:6 (or whatever) aspect ratio of the retro computer/display that you are targeting. So the X,Y PPI in this dialog will be different than your square pixel display you are working on. Then, you can toggle the View | Dot for Dot
menu option to edit your image in its native PPI, and to view the image in scaled mode on your modern display. Thus you can edit the native pixels and approximate the results easily on your modern display. When you eventually export the image, the PPI settings of the image should be respected, so you get an image that displays correctly on the retro system.