Derailleur and back wheel alignment issues I've got a very old used bike. It has a bunch of issues I'm trying to fix at once: the derailleur is not keeping the chain tight only in certain gears, the back wheel wobbles slightly and over time gets pulled forward to the point of rubbing against the frame.

I took the wheel out and determined that there is probably some minor wobbling coming from something being off with the bearings but I decided not to take it apart, just live with it and try to put the wheel back pulled further back and somehow fixing the derailleur/gears issue too.

I figured out that there is one specific configuration when everything seems to work, see it on the photo below. (Note, the axle needs to be completely pulled back on the side pictured, but on the other side slightly more forward than that, that's the only way to have the wheel aligned with the line of travel at the middle of the frame). In this angle, the derailleur is able to keep the chain tight for all gears.

The issue is that now if I start pedaling or shifting gears, eventually the derailleur is forced to rotate counter clockwise and the axle is pulled forward so that I'm back at my original issues. I just can't seem to figure out how to maintain this specific position 

How could I solve this?

Edit: I'm adding below a second image from a different angle

Update: 

Thank you for all the comments and suggestions! Based on them, I plan to do the following:


Fix wobbling of the wheel by replacing bearings so that I'll be able to move the wheel forward
Replace the derailleur hanger and the mounting bolt attaching the derailleur to it
Use axle nuts instead of the regular ones and remove washers from the axle
Replace cable housing and possibly the chain too


To do the above, I'm having two new challenges:


How to unscrew the super tight and somewhat rusty current attachment of the derailleur to the current hanger? (see picture below)
Where can I find a suitable replacement mounting bolt that would allow me to attach the derailleur to the hanger so that it can pivot? (see part #2 and connecting parts in David D's answer)
That's one seriously chopped-around bike.  I see a bolt holding the rear derailleur on, on an axis that would normally pivot.   This means your B tension is non-existent or infinite depending on the gear chose.

I also see the hanger well out of position and missing its other bolt.  That means the derailleur is at a funny angle.  Attempted `shopping below:

Additionally, what's that brownish dish thing that is about where the smallest cog would be?  Maybe its supposed to be there to stop the chain dropping off the littlest cog ??

I suspect your chain will also be too long, once this angle is all corrected.

The gear cable outer also looks kind-of lumpy, as though the metal reinforcement is kinked or broken.  This may cause issues, or with friction shifters it may simply provide vagueness while shifting.



The wheel is sliding forward in the dropouts because its either not tight enough, or there's not enough resistance.  I think the axle nuts look like generic hardware store nuts, and will probably lack any serrations underneath.  Some time with a file could restore rounded serrations back to grippier ones, but really some new axle nuts would be better.

  This is your image, simply rotated so its about normal angle.  From this you can see how far back the derailleur is.

Here are some lines drawn on top of your image to show the angle difference:
  That empty little hole in the hanger is missing a special bolt, which stops it rotating around the axle and undoing your axle nut and holds the derailleur on when the wheel is out.

This is a conventional claw hanger - there is nothing special here, these pre-date all the unique weird custom hangers.  These are worth around $5-10 of most currencies - it would be easier to buy a new claw hanger than mess around trying to make that weird nut on the back.



  This mess is a mochup of where your derailler should be sitting, relative to the axle.  This position means there will be more teeth engaged at once with the chain.



Another realisation just now - you have a stiff link in your chain.



This results in a noticeable click or clunky every 4~5 crank revolutions, as this inflexible link passes through the derailleur's jockey wheels.  This is probably the point that the chain was closed up at fitting time, though it can be caused by dirt.

To fix it, grab the chain in your fists on either side and try to bend the chain sideways.  Start with enough force to open a loose jar-lid, and work up to a bit more if the chain doesn't come free in that link.  



And finally - you say that the loose bearings are something to live with now.  I suspect this wobble is also contributing to the sloppy gears, because as the wheel moves it will move the whole cassette too.   I would totally recommend tuning up the bearings, and perhaps a clean and re-grease if you possibly can. 



In summary - I think this is fixable.  It will never be perfect, but I'm sure it can be better.