dir goes out of scope when execution leaves Start. Declare dir outside the Start function, and you can access it in ChooseBlock. Also, Direction is capitalised in your code, so try:
private bool currentDirection;
ChangeDirection dir;
void Start()
{
dir = new ChangeDirection();
}
IEnumerator ChooseBlock()
{
while (true)
{
bool currentDirection = dir.Direction;
...
...
...
}
}